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

Improve relocatability of sysimages with BBBase #214

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ven-k
Copy link

@ven-k ven-k commented Jan 31, 2022

Currently artifact_toml paths are defined using @__DIR__. This hardwires the paths. Any sysimage with BinaryBuilderBase thus becomes non-relocatable. Particularly, any function that downloads artifacts throws an IOerror for not finding <original_package_location>/Project.toml

(Similarly get_bbb_version is suitably modified)

ven-k added 7 commits January 13, 2022 14:40
- create a const artifacts_toml with @path
- use envcache to determine the version instead of parsing the project.toml: Using @path here doesn't work as
      - a: Project.toml which at DIR*..
      - b: the entire `src` would be stored in the Path object (and not Project.toml)
- While creating storage_cache check if "deps_path" is valid else create one at dev/BBBase.jl/deps: Even here using @path directly is of no use as you are creating a new folder and don't intend any file to survive relocation
So now it checks if the path is valid; ow creates one at .julia/dev
Leaving this storage_cache untouched will result in creating a folder identical to original-depot-path failing all the RelocatableFolder's `getpath` efforts
@giordano giordano requested a review from staticfloat January 31, 2022 13:57
function get_bbb_version(dir=@__DIR__, uuid="7f725544-6523-48cd-82d1-3fa08ff4056e")
# Get BinaryBuilder.jl's version and git sha
version = Pkg.TOML.parsefile(joinpath(dir, "..", "Project.toml"))["version"]
version = Pkg.activate(".") do
Copy link
Member

Choose a reason for hiding this comment

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

@ven-k ven-k marked this pull request as draft February 16, 2022 14:05
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.

2 participants