Skip to content

Conversation

@JanisErdmanis
Copy link
Contributor

Currently, Revise hardcodes paths at compilation time, which prevents its pkgimage cache from being relocatable. This creates issues when forming Julia distributions like Jumbo that need relocatable package caches.

This PR addresses the issue by converting the hardcoded path constants to uninitialized globals that are assigned in the __init__ function instead. Limited testing shows that the relocated Revise works fine with this approach.

global juliadir = find_juliadir()
global basesrccache = normpath(joinpath(expected_juliadir(), "base.cache"))
global depsdir = joinpath(isnothing(pkgdir(@__MODULE__)) ? dirname(@__DIR__) : pkgdir(@__MODULE__), "deps")
silencefile[] = joinpath(depsdir, "silence.txt")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tangentially, the whole silence functionality should be rewritten using Preferences.jl instead of mutating the package folder.

Copy link
Contributor Author

@JanisErdmanis JanisErdmanis Nov 19, 2025

Choose a reason for hiding this comment

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

I am currently overwhelmed and refactoring to use Preferences.jl is not on my plate, but I support the change.

@timholy timholy merged commit b29c68a into timholy:master Nov 22, 2025
12 of 13 checks passed
@timholy
Copy link
Owner

timholy commented Nov 22, 2025

Thanks!

@timholy
Copy link
Owner

timholy commented Nov 22, 2025

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.

3 participants