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

Consider to load jar extensions automatically from the working directory #674

Open
mikir opened this issue Nov 28, 2024 · 0 comments
Open
Assignees
Labels
core Zserio core module enhancement New feature or request
Milestone

Comments

@mikir
Copy link
Contributor

mikir commented Nov 28, 2024

Is your feature request related to a problem? Please describe.
Currently, there is only one way how to run independent external jar extension. For example, new Zserio C++17 extension can be run by the following command:

java -cp zserio.jar:zserio_cpp17.jar zserio.tools.ZserioTool schema_name.zs -cpp17 output_directory_name

This is cumbersome and not intuitive. The intuitive command could be

java -cp zserio_cpp17.jar -jar zserio.jar schema_name.zs -cpp17 output_directory_name

However, this command is not supported by Java engine. Option -cp is ignored if option -java is used.

Describe the solution you'd like
It would be probably better if Zserio core will automatically try to load all jar extensions available in the working directory (directory where the zserio.jar is located). Then, it would be for example enough just to copy binary zserio_cpp17.jar into the directory where zserio.jar is located and run the same command as usual:

java -jar zserio.jar  schema_name.zs -cpp17 output_directory_name

Describe alternatives you've considered
We might consider to introduce new command line option which will specify the directory where to search for Zserio jar extensions and not to load them automatically. This would give users the option to disable automatic extension loading. However, this will require a little bit more complicated command line. Example:

java -jar zserio.jar -extensionsDir extensions_directory schema_name.zs -cpp17 output_directory_name
@mikir mikir added enhancement New feature or request core Zserio core module labels Nov 28, 2024
@mikir mikir added this to the 2.16 milestone Nov 28, 2024
@mikir mikir self-assigned this Nov 29, 2024
@mikir mikir modified the milestones: 2.16, 2.17 Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Zserio core module enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant