Check sezpoz#5
Merged
Merged
Conversation
Admittedly, we shut up a few instead of fixing them. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is more robust than expecting the 'apt' main class to be available in the default class path. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
... but fall back to calling the apt class directly if we're not running inside a JDK. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
... instead of calling 'javac' directly. This is more robust than expecting 'javac' to be in the PATH as long as we are assuming that the regression tests are run within a JDK -- which is usually the case because they are run in the context of building scijava-common. This fixes http://trac.imagej.net/ticket/1560. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It is really a shame, but it seems that all of the following strategies fail in Eclipse: - try to figure out where a JDK might be (there might be none) - try to figure out where Eclipse is and use its APT processing (first, we cannot really figure out where Eclipse is when running or debugging regular Java classes with a main() method -- with JUnit tests, we could at least figure out where Eclipse's JUnit support classes are and hence where the current Eclipse is -- and there is no platform-independent Java way to enquire the executable path of the parent process of the current JVM; second, even then we would have to deal with tons of Eclipse-specific things we would have to provide to call Eclipse's APT) - run Sezpoz' Indexer6 directly (it cannot be run directly, you have to have a RoundEnvironment and provide scanners for annotations and classes and mirror classes) The most promising solution to the problem that Eclipse is still unable to conform to the Java Compiler specification, at this time and age, would have been to call the Indexer6 directly. But this developer thinks that the effort required to basically replicate the complete APT functionality just to run Sezpoz is not worth it: we could instead tell the developer to get their act together and install a JDK already (which they need anyway because Eclipse is *not* the gold standard, the JDK is, so if things compile/run correctly in Eclipse, you *still* have to test with plain JDK). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This finally takes care of http://trac.imagej.net/ticket/1560. While we did not really "fix" Eclipse's inability to run annotation processors as required by the Java Compiler specification, at least we have warnings in place that tell the developer (insofar competent) that they are running crippled tests and that they should go and get a JDK and use it from within Eclipse. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This should fix the issue that a JDK is needed to run the scijava-common unit tests in Eclipse.