AppliedEnergistics / Applied-Energistics-2

A Minecraft Mod about Matter, Energy and using them to conquer the world..
https://appliedenergistics.github.io/
Other
1.44k stars 662 forks source link

Use Jetbrains annotations for API #5130

Closed Technici4n closed 3 years ago

Technici4n commented 3 years ago

Would allow using @ApiStatus.NonExtendable and friends. We should also remove all these pesky @Nonnull and assume that non null is by default.

yueh commented 3 years ago

This will not provide any real benefit and instead just adds more work on our side for something which will not be used.

First it's a vendor specific thing, so anyone not using IDEA will not benefit from it. Also anyone using IDEA will just ignore them as the javadocs now.

Secondly the API and implementation are technically two separate projects. Therefore we basically provide a reference implementation for the API, so if @ApiStatus.NonExtendable is done correctly, it should always trigger a warning or whatever it produces for our own code.

Thirdly their retention type should be CLASS, but neither Minecraft nor Forge provides this dependency. Which means we would have to add it as dependency. However due to Forge/ForgeGradle being broken, we have to strip all dependencies from the pom.xml as it will otherwise result in non resolveable depdencies. Maybe solvable, but not worth the effort to have another thing around just waiting to break randomly.

Finally, which overlaps a bit with the first point. No IDE specific things will be added to force any potential contributor or addon dev into a vendor locking. If jetbrains is serious about contributing to the java ecosystem, they are free to pickup jsr305 again and improve it for everyone.