Fail if the legacyClassPath.file does not exist #14
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.
Motivation
The legacyClassPath is only used in development environments. In production, BSL will fall back to
java.class.path
, since the Minecraft launcher passes all requested libraries and the Minecraft jar on the classpath.If the file passed in the
legacyClassPath.file
system property exists, BSL falls back to using thejava.class.path
, which is disastrous in dev environment. IDEs put the mods themselves on the class-path too, which leads to BSL converting these mods into modules on the bootstrap layer, causing undecipherable errors when FML later also tries to add the same mods again onto a lower layer.We've had this error multiple times now when the NeoGradle IDE integration failed to properly write the legacyClassPath file before launching, leading to errors such as:
Or:
Change
This change will now error out immediately if the file given as
legacyClassPath.file
does not exist.