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

add logic to prefer loading modules that are already loaded #55908

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vtjnash
Copy link
Sponsor Member

@vtjnash vtjnash commented Sep 27, 2024

Iterate over the list of existing loaded modules for PkgId whenever loading a new module for PkgId, so that we will use that existing build_id content if it otherwise passes the other stale_checks.

@vtjnash vtjnash added domain:packages Package management and loading backport 1.11 Change should be backported to release-1.11 labels Sep 27, 2024
@vtjnash
Copy link
Sponsor Member Author

vtjnash commented Sep 27, 2024

Tested locally with

JULIA_DEPOT_PATH=testdepot ./julia -e 'using REPL'

then

JULIA_DEPOT_PATH=testdepot: ./julia -e 'Base.require_stdlib(Base.PkgId(Base.UUID("3fa0cd96-eef1-5676-8a61-b3b8758bbffb"), "REPL")); using REPL; display(Base.loaded_precompiles)'

which shows the result is correct for both testdepot: (no loaded duplicates) and testdepot (loaded duplicates)

@Keno
Copy link
Member

Keno commented Sep 28, 2024

Tested locally with

Add this to the test suite?

@KristofferC KristofferC mentioned this pull request Sep 30, 2024
39 tasks
Iterate over the list of existing loaded modules for PkgId whenever
loading a new module for PkgId, so that we will use that existing
build_id content if it otherwise passes the other stale_checks.
@vtjnash vtjnash force-pushed the jn/prefer-no-duplicate-modules branch from b85a479 to 83ed90f Compare September 30, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.11 Change should be backported to release-1.11 caching domain:packages Package management and loading
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants