apposed / jaunch

Launch Programs 𝙔𝙀π™ͺ𝙧 Way! πŸ”
The Unlicense
6 stars 2 forks source link

Make TOML configuration reader scan for extension files #38

Open ctrueden opened 4 months ago

ctrueden commented 4 months ago

From this Zulip chat: a scenery/sciview use case requires the following --add-opens flags:

            "--add-opens=java.base/java.lang=ALL-UNNAMED",
            "--add-opens=java.base/java.lang.invoke=ALL-UNNAMED",
            "--add-opens=java.base/java.net=ALL-UNNAMED",
            "--add-opens=java.base/java.nio=ALL-UNNAMED",
            "--add-opens=java.base/java.time=ALL-UNNAMED",
            "--add-opens=java.base/java.util=ALL-UNNAMED",
            "--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED",
            "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED",
            "--add-opens=java.base/sun.util.calendar=ALL-UNNAMED"

This is quite a few more packages than the ones configured in the current fiji.toml. And it highlights an important consideration: extensions to Fiji might need to augment the Jaunch configuration with additional flags.

A general way to address this, which would be compatible with the current ImageJ Updater, would be for Jaunch to look for additional files matching some convention, such as jaunch/fiji-x-*.toml, and load those as well. Then an update site could ship, say, jaunch/fiji-x-sciview.toml, with the additional --add-opens flags needed for that update site's functionality to behave properly with Java 17+.

imagesc-bot commented 4 months ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/jaunch-a-new-java-launcher-test-fiji-with-java-21/92058/1

imagesc-bot commented 4 months ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/jaunch-a-new-java-launcher-test-fiji-with-java-21/92058/55

ctrueden commented 2 months ago

With c5101c3a94c3093c45ae67d4ecfc5c4ecc9d99fd, TOML files get sourced based on the primary TOML config file's includes line. To tackle this issue, we could simply allow wildcards in there, so that additional config files could be dropped in matching the pattern.