Skip to content

Rework of the JuliaPackage easyblock#4146

Draft
Crivella wants to merge 13 commits into
easybuilders:developfrom
Crivella:feature-julia_reusedeps
Draft

Rework of the JuliaPackage easyblock#4146
Crivella wants to merge 13 commits into
easybuilders:developfrom
Crivella:feature-julia_reusedeps

Conversation

@Crivella
Copy link
Copy Markdown
Contributor

@Crivella Crivella commented Jun 4, 2026

Summary of changes

  • Adds compile_cache check to sanity checks to ensure that the compiled version of the package can actually be found/re-used
  • Allow specifying test-only dependencies with the is_test_dependency EC param
  • Allow turning on Julia's verbose output with the julia_debug EC param
  • Allow installing subpackages of a package (eg optional dependencies) by specifying their root dir relative to the toplevel package with the subpackages_dirs EC param
  • Allow reusing packages from a dependency (fix JuliaPackage can't really work with depedencies #4123)
    • The environments of the dependencies are merged into the one of the package being installed
  • Use Pkg.instantiate() to install all extensions instead of installing them one by one with Pkg.develop
  • Remove need for deps to be ordered in the EC files
  • Makes use of Julia's capability to install extension in parallel (still respecting the max_parallel option)
  • Allows running package tests in a dedicated step
    • Can work in offline mode but many packages might require online to work properly due to how the temporary environment are build by some test runner themselves
  • Switch to using an EB specific environment variable to keep track of the LOAD/DEPOT PATHS and use them to correctly set them for Julia in a site-specific startup script

Maybe TODO

Notes

This PRs includes the changes from:

Fixes:

@Crivella Crivella force-pushed the feature-julia_reusedeps branch from 6ac2dc8 to c325f44 Compare June 4, 2026 15:24
@Crivella
Copy link
Copy Markdown
Contributor Author

Crivella commented Jun 5, 2026

Moved the final setting of LOAD_PATH and DEPOT_PATH to Julia's site-specific startup script.
This resolves:

  • having to write custom module code
  • the reversing setenv problem
  • Lua-vs-Tcl syntax

self.include_pkg_dependencies()
def install_source(self):
"""Add the Julia package source files in the installation directory."""
if self.cfg['is_test_dependency']:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks odd. How does this work? It (may) designate a whole easyconfig as test-only making the files missing from the installed module.

We should avoid:
a) That it is set on anything but a (bundle-)extension
b) That it turns up in extensions of the module.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah should probably add more checks around that.
Right now i am considering what i want to do with it, and if i should shift this from a flag to single extensions to just treating build-deps as test-only dependencies.

The main thing that i am focusing on now is how feasible it is is re-using deps. It is working but is fairly sensitive. If 2 ECs ships the same Julia package, it is possible that the compile cache will be broken based on load order.
The check i've added right now only works if the 2 ECs are being used as a deps of another.
The other point is that if we go this route every Bundle should ideally define only 1 exts (which begs the question if bundles are needed at all), otherwise we go back to the old intended (but broken way) of just using deps as a fancy way to tell Julia which packages to re-install but not really use the deps themselves (still think that solution might not really allow to load multiple packages at the same time)

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

Successfully merging this pull request may close these issues.

JuliaPackage can't really work with depedencies

2 participants