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

Load extensions with ServiceLoader #32

Open
CrissNamon opened this issue Mar 31, 2023 · 5 comments
Open

Load extensions with ServiceLoader #32

CrissNamon opened this issue Mar 31, 2023 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@CrissNamon
Copy link
Owner

CrissNamon commented Mar 31, 2023

Extensions for CompaJScriptBase are loaded manually with static method:

CompaJScriptBase.addExtension(new MathExtension());

They should be loaded with ServiceLoader automatically inside GroovyTranslator and then added to CompaJScriptBase with CompaJScriptBase.extend(Extension).
ServiceLoader requires file descriptor with name tech.hiddenproject.compaj.lang.extension.Extension placed in resources folder inside lang module. This file should contain fully qualified class names of all Extension classes, each on new line:

tech.hiddenproject.compaj.extension.ComplexExtension
tech.hiddenproject.compaj.extension.MathExtension
etc...
@CrissNamon CrissNamon added the enhancement New feature or request label Mar 31, 2023
@CrissNamon
Copy link
Owner Author

@CrissNamon CrissNamon added the good first issue Good for newcomers label Apr 3, 2023
@saurabhyadav1985
Copy link

I would like to contribute here.

@CrissNamon
Copy link
Owner Author

I would like to contribute here.

OK, go ahead)

@harsh-2O
Copy link

harsh-2O commented Apr 7, 2023

Can I work on this if not yet solved ?

@saurabhyadav1985
Copy link

Sure, go ahead

harsh-2O added a commit to harsh-2O/compaj that referenced this issue Apr 7, 2023
harsh-2O added a commit to harsh-2O/compaj that referenced this issue Apr 7, 2023
harsh-2O added a commit to harsh-2O/compaj that referenced this issue Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants