Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for extension modules #252
The main goal of this PR is to allow us to load primitives implemented in Java dynamically at run time.
An extension module is loaded the same way as other modules:
The result of such a load is a class, as for other modules.
(This is just a possible example. Database support is not included in this PR.)
Documentation is added in docs/extensions.md.
The PR includes a few other minor cleanups, somewhat related to this work.
daumayr left a comment
How much access do the Java implementations of extensions have to the SOMns implementation?
Is there a dependency system planned for the plugins? Assuming the plugin java code can import anything from the SOMns core codebase, is it possible for a plugin to also import classes from another plugin?
Extensions are currently loaded into their own class loader. Thus, there isn't really much interaction between the interpreter and the extension at this point.
Importing? Well, class loading logic applies.
2 times, most recently
May 27, 2018
Hm, you mean in terms of other class path dependencies only? Perhaps this could work: https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html
What would the setup script do?
Probably, to ease maintenance. Is that something that needs to be enforced somehow?
Isn't that something the build script needs to do anyway? I am not sure why you need a separate 'script' for that.
Maybe put a best practice/guideline/convention in the doc, enforcement doesn't seem necessary right now.