New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark JAIIOServiceImpl as optional #171
Comments
I'm fine marking this optional, but I have two questions:
|
It is a
That would be okay, but it does not solve the underlying problem that problems preventing this service from starting up escalate to problems preventing the SciJava context from starting up -- even if the user does not want to do any file I/O but just happens to have an incomplete SCIFIO in the class path... |
I agree that we should rename We could add a mode which can be toggled via a system property, and Fiji could toggle it on, but Fiji would then suffer from the latter "latent" type of problems which result from non-fail-fast systems. I want to emphasize that no matter what we do, with an extensible system like this, it will be possible (and maybe even probable) for third parties to create their own update sites which are malformed such that when enabled, they hose the entire Fiji installation. Of course we should do what we can to minimize that possibility, but it will always be there. And those bugs are ultimately not our responsibility to work around. |
To elaborate on the use of |
I am afraid that this will never get my signature. If a Fiji installation is hosed by simply checking a box to follow an update site, it should always be possible to launch Fiji (or ImageJ!), still. And it should always be possible to launch the updater inside the application, uncheck the box and be happy again. If checking said box prevents Fiji or ImageJ or the Updater from starting up, we will need two modes: one that fails fast, for developers, and one that complains a lot but still tries its best to start things up. Think about it: at the end of the day, the justification for our salaries comes from the users. Not from the developers using our software. |
Then the updater infrastructure needs some changes. It must then not be possible to shadow various key JAR files, for instance. And care must be taken to ensure that if e.g. |
Those changes would still not address the issue that ImageJ would fail to start altogether. |
Sure they would. My proposal is essentially a "safe mode" for ImageJ that excludes content added by third party update sites. The only way there would be problems is if the JAR files in the "core" folder had version skew. But we would put only the minimal JARs necessary to run the updater in there... not even SCIFIO would need to go in there. |
BTW this issue is the same as #18. And the more sophisticated the fix is, the more likely it is wrong. I think the fundamental problem here is that we are talking about developers and users alike, and we expect the same level of leniency to apply in both contexts. But that's not true! When users start up Fiji, they should never be prevented from using it when some services fail to initialize, as long as they do not require those services for their work! So we need to figure out a way to make an ImageJ2 context fail upon non-initializable services when running in unit tests and/or inside an IDE, but not fail when running through the ImageJ launcher. |
@ctrueden seems like this issue is not exclusively SCIFIO-specific.. we should discuss at some point. |
Since the above discussion, I added a |
It is all-too-easy to mess up, say, a Fiji installation and end up with OMERO's version of
jai_imageio.jar
instead of SCIFIO's. In such a case, theJAIIOServiceImpl
will fail to load and because it is not marked optional, it will completely block the SciJava Context from being instantiated.This happened with the TrackMate-dev update site because the previous
imagej-maven-plugin
version overwrote SCIFIO'sjai_imageio.jar
with OMERO's.Alternatively, the class should use JAI lazily so that it can be instantiated, but fails to perform its job iff the user wants to use it despite having a messed up installation.
The text was updated successfully, but these errors were encountered: