Skip to content

Rework of the JuliaPackage easyblock#4146

Open
Crivella wants to merge 32 commits into
easybuilders:developfrom
Crivella:feature-julia_reusedeps
Open

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

Conversation

@Crivella

@Crivella Crivella commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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 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 (setting runtest to True for every extension that needs testing)
    • The test are both skippable (--skip-test-step) and ignorable (--ignore-test-failure)
    • Tests are ran in offline mode by default unless test_online is set to true
    • If both offline and online test are to be performed, the offline ones go first as they should not modify the test environment that we are setting up
  • 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:

AI usage

  • GitHub CoPilot FIM auto-completion is active in my IDE and has been used in this PR to sporadically auto-complete code/docstrings

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

Crivella commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

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

Comment thread easybuild/easyblocks/generic/juliapackage.py Outdated
Comment thread easybuild/easyblocks/generic/juliapackage.py Outdated
Comment thread easybuild/easyblocks/generic/juliabundle.py Outdated
@Crivella Crivella force-pushed the feature-julia_reusedeps branch from 86ff2cd to 82f8900 Compare June 9, 2026 20:54
Comment thread easybuild/easyblocks/j/julia.py
Comment thread easybuild/easyblocks/generic/juliapackage.py Outdated
@Crivella Crivella force-pushed the feature-julia_reusedeps branch from f4fcc99 to 482c8fb Compare June 10, 2026 10:17
@Crivella Crivella force-pushed the feature-julia_reusedeps branch from 773b011 to e100f57 Compare June 10, 2026 15:09
@Crivella

Crivella commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Concerning the points of "re-usability" of deps I am unsure what is the best way.
It is possible to do so, but if we wanted to do things properly, every bundle should never define more than 1 package (or 1 package + its optional subpackages if those are never used independently).

The reason being that if 2 packages define the same extension, the compile cache will could work or be broken depending on the load order of the packages from what i've seen (this is why i check for conflicts when rebuilding the manifest).
I think this mainly happens if one package could use the other as an optional dependency, eg: I am working on a package that depends on JLD2 and Flux as deps.
Flux also has JLD2 as an optional dependency. With this approach if JLD2 is not built into Flux (what i am doing right now) if JLD2 is loaded first everything works, but if not i got into an infinite compilation loop which exited after some max-try limit and ended up working in what i assume is an interpreted-only mode

The old attempted route of just using the dependencies just as a source of information for the packages to install (but build a completely new and isolated environment) also has downsides:

  • Bundle should still be "1-package" only or anything using it as a dependency will also bring in potentially un-needed extra packages
  • I think weird think could still happen also in this scenario with compile caches depending on load order

EDIT: added a PR for what i have concerning the aforementioned packages

Pinging also @lexming since he was the original author of the easyblock to get feedback on these points and the new EB in general

@Flamefire

Copy link
Copy Markdown
Contributor

every bundle should never define more than 1 package

Why would we need a bundle then? Isn't this effectively saying: Use JuliaPackage?

@Crivella

Copy link
Copy Markdown
Contributor Author

Why would we need a bundle then? Isn't this effectively saying: Use JuliaPackage?

There are some packages that have optional features that are enabled by installing a subpackage. In that case i expected them to always be bundable without problems.

Indeed i think the proper approach would be to only have Package, even in Python we sometime encounter trouble when extensions of one package shadow one of another which depending on version might or might not work

@Flamefire

Copy link
Copy Markdown
Contributor

Indeed i think the proper approach would be to only have Package, even in Python we sometime encounter trouble when extensions of one package shadow one of another which depending on version might or might not work

I mentioned something like that in Slack recently as it seems like PythonBundle is/should be preferred but IMO it makes it too easy to add additional packages that might silently conflict with others. The suggestion was to enhance the CI checks to catch that.
So might be worth to discuss this in a larger group

@Crivella Crivella marked this pull request as ready for review June 11, 2026 10:23
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