Commit dce266e
fix: add manual META-INF/services files for NmsProvider ServiceLoader registration
The @autoservice KSP processor may not always generate the service file
correctly (e.g. due to paperweight dev bundle resolution issues). Adding
manual service files ensures V1_21_11NmsProvider and V26_1NmsProvider
are always discoverable by ServiceLoader at runtime.
Also makes ServiceLoader iteration robust against class loading failures
and updates the NMS template generator to auto-generate service files.
Agent-Logs-Url: https://github.com/SLNE-Development/surf-api/sessions/1c421ac7-9194-4697-91fd-1373913d3900
Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>1 parent 64eb38b commit dce266e
4 files changed
Lines changed: 50 additions & 4 deletions
File tree
- surf-api-generator/src/main/kotlin/dev/slne/surf/api/gen/nms
- surf-api-paper/surf-api-paper-nms
- surf-api-paper-nms-common/src/main/kotlin/dev/slne/surf/api/paper/nms/common
- surf-api-paper-nms-v1-21-11/src/main/resources/META-INF/services
- surf-api-paper-nms-v26-1/src/main/resources/META-INF/services
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
81 | 106 | | |
82 | 107 | | |
83 | 108 | | |
| |||
Lines changed: 23 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
105 | 118 | | |
106 | 119 | | |
107 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
108 | 124 | | |
109 | 125 | | |
110 | 126 | | |
| |||
113 | 129 | | |
114 | 130 | | |
115 | 131 | | |
116 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
117 | 136 | | |
118 | 137 | | |
119 | 138 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments