Closed m-dzianishchyts closed 3 months ago
Great! This may become my new favorite feature. I haven't tested the implementation, but I sure have an opinion on naming and the public API 🙂 This was not defined in the original task, but now that we have the working code, I think we are ready to have this discussion.
JJAVA_BOOTSTRAP_OFF
-> JJAVA_LOAD_EXTENSIONS
(default 1
, can be set to 0
or ""
to disable)org.dflib.jjava.magics.PluginBootstrap
-> org.dflib.jjava.Extension
getBootstrapScript
may be just enough for the extension authors.getBootstrapScript
with a callback method that is passed JavaKernel
instance. So the extension would install itself. E.g.:void install(JavaKernel kernel) { ... }
Applied requested changes. Here is updated DFLib patch that was used during testing:
About this PR:
Implements auto-loading according to #28 keeping all
JJAVA_
script variables at place for now. ProvidesJJAVA_LOAD_EXTENSIONS
env var that will disable auto-loading if defined and falsy.Testing
Tested with DFLib using the next patch:
DFLib patch (outdated, see discussion)
```patch Subject: [PATCH] DFLib auto-bootstrap --- Index: dflib-jupyter/pom.xml IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/dflib-jupyter/pom.xml b/dflib-jupyter/pom.xml --- a/dflib-jupyter/pom.xml (revision 999f4df786c42bc2e00a2dbaaf6fd83a10f14dd3) +++ b/dflib-jupyter/pom.xml (date 1723804202101) @@ -47,6 +47,11 @@