-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: removed unneeded `info modulepath` And any code creating module paths because a list with only modules is either the same as the list of dependencies (class path) or it would contain only "real" modules which is a useless distinction. * refactor: minor rollback of changes to `resolveInJavaHome()` Earlier changes were moving in the direction of passing a `Jdk` object instead of a version string. But that is actually not future save, where there might be a point where we would want to be able to say: "okay, I've used 'javac' from Jdk X to compile this and now I need 'native-image', but it's not in this Jdk X. Is there perhaps a newer Jdk I could use?". If we pass a `Jdk` object we would be stuck at the current version. * chore: minor change in running `jar` Now using the generic `Util.runCommand()` * fix: fixed issue with module name handling Setting the module name to an empty string on the command line would not result in the expected behavior (turn the script into a module with a name generated from the script name) * fix: fixed info classpath implementation * chore: make `ModuleUtil.isModule()` slightly smarter The method will now also look for an alternative location for the `module-info.class` file. This should still be improved though. * chore: minor text change * fix: `CmdGeneratorBuilder` now has its own `moduleName` This is similar to `mainClass` which also exists both in the `Project` and in the `CmdGenerator`. And for the same reason: we want to be able to use a different value at runtime than that at buid time. But unlike `mainClass` the value for `moduleName` is not always copied as the default value from `Project` to `CmdGenerator`; we don't always want to run JARs as modules by default, for example, but instead we'd like the user to state their intentions explicitely by passing `--module` to the `run` command. * feat: added `info jar` and some other options The command `info classpath` now takes an optional `--deps-only` and `info tools` taken an optional `--select` where you tell it to only return information for that specific field. * chore: allow `//MODULE` tag without name This will cause JBang to generate a proper module name. * chore: rewording of error message * feat: `//MODULE` is now more usable JBang will now automatically add all system modules as required and will open the script's package to everyone. This is not ideal because it breaks all encapsulation, but it results in code that will work in most cases. If you want better control you'll have to fall back to using a separate `module-info.java` file. * test: fixed tests not always working right First of all having a `@BeforeEach` with the same method name in a base class and a sub class can sometimes cause problems, especially when you try to run single tests. And the second problem would normally occur only on Windows where the TEMP folder is actually in the same filesystem tree as the user files, meaning that when we created a temp folder strcture for the tests the code that looks for aliases and catalogs etc would still return actual user files, ruining the tests.
- Loading branch information
Showing
27 changed files
with
331 additions
and
147 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.