Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
It turns out that under
-Werror
, the warning that javac emits when encountering our hacky-Arandomtimestamp=<bla>
parameter causes the indexing to fail.For an example of that, consider https://github.com/palantir/refreshable:
cs launch scip-java:0.9.7 --contrib --scala 2.13.12 -- index
wherecs
is CoursierWhy do we have this
-Arandomtimestamp
at all?It's there to ensure that Gradle doesn't cache the compilation results at all, as it can lead to a very frustrating experience of not seeing semanticdb files produced despite making changes to the build.
Note - gradle's
clean
command doesn't clean the particular cache affected by this, neither does--no-daemon
option - we already have both of those in auto-indexing and caches still persist between runs without modifying javac optionsAlternatives rejected
Attempting to remove the
-Werror
flag from the compilation argumentsRejected because historically any modifications to gradle javac flags have been brittle and required hacks. Additionally, there may be builds that assert that the code is compiled with certain flags in CI, and we don't want to make any further modifications to the build
unless it's necessary
Making CLI argument parsing in scip-java-semanticdb more lenient to accept anything
Rejected because we want to be strict in what arguments are being passed into the plugin, given how already difficult it is to debug compiler plugin pipeline and how much damage one can do by misspelling a parameter (i.e. putting files silently in wrong path)
Removing this entirely and instead realying on a magical env variable
Weakly rejected because magical env variables will require documentation for development - as opposed to a magical "always on" parameter that affects nothing but the plugin and doesn't exist anywhere but during the single gradle run for auto-indexing. The latter seems better.
Test plan