Skip to content
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

Expose Layers config to running application #76

Open
aalmiray opened this issue Jan 29, 2021 · 1 comment
Open

Expose Layers config to running application #76

aalmiray opened this issue Jan 29, 2021 · 1 comment

Comments

@aalmiray
Copy link
Contributor

Working with the modular-tiles example I wanted to add an option (via menu) to add/remove plugins. This requires copying files to the watched plugins directory, and removing files from said directory.

The problem is, the application has no clue where this directory is located! The application can be launched from any directory within the file system, yet the plugins directory is set relative to the basedir of the given layers config file. For this use case I could get away by having access to the value of the computed basedir (calculated by org.moditect.layrry.launcher.LayrryLauncher). This value could be exposed as a System property and would have to blindly assume that the plugins directory remains as plugins.

A better approach would be to let the running application have access to parsed the Layers configuration or even the Layers instance. If the later then it should not be possible for the app to run the Layers once again.

@aalmiray
Copy link
Contributor Author

aalmiray commented Feb 2, 2021

Perhaps if the main launcher implemented a given interface that allows passing a read-only view of the Layers instance? I wonder what sort of classloading issues this would cause as the application resides in a different classloader than the launcher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant