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

Tweak test LOAD_PATH and fix loading test #52150

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Tweak test LOAD_PATH and fix loading test #52150

merged 1 commit into from
Nov 14, 2023

Conversation

Keno
Copy link
Member

@Keno Keno commented Nov 13, 2023

This does two things:

  1. Give the latest addition to the loading test an active project, so that it works, even without a global one.
  2. Standardize the JULIA_LOAD_PATH setting to "@:@StdLib" for both Base.runtests (which CI uses) and make test-*. Before, the former was using the default load path, while the latter was using "@StdLib" only. However, neither is great. With the default load path, test results could in theory depend on the global environment and tests that accidentally modify the global environment go undetected. The latter resolved those issues. However, without the active project on the load path, the behavior is quite weird - even if you activate a project you can't load it and even if you could, and even if you try to load something explicitly, that project can't find its dependencies. I think "@:@StdLib", is a reasonable compromise here. It has the same protections against the global environment interfering with test results, while also making the active project logic work as usual.

Fixes #52148
Fixes #50055 (the remainder thereof at least)

This does two things:
1. Give the latest addition to the loading test an active project,
   so that it works, even without a global one.
2. Standardize the JULIA_LOAD_PATH setting to "@:@StdLib" for both
   `Base.runtests` (which CI uses) and `make test-*`. Before, the
   former was using the default load path, while the latter was using
   "@StdLib" only. However, neither is great. With the default load path,
   test results could in theory depend on the global environment and tests
   that accidentally modify the global environment go undetected. The latter
   resolved those issues. However, without the active project on the load
   path, the behavior is quite weird - even if you activate a project you
   can't load it and even if you could, and even if you try to load something
   explicitly, that project can't find its dependencies. I think "@:@StdLib",
   is a reasonable compromise here. It has the same protections against the
   global environment interfering with test results, while also making the
   active project logic work as usual.

Fixes #52148
Fixes #50055 (the remainder thereof at least)
@vtjnash vtjnash added test This change adds or pertains to unit tests status:merge me PR is reviewed. Merge when all tests are passing labels Nov 13, 2023
@vtjnash
Copy link
Sponsor Member

vtjnash commented Nov 13, 2023

Does this sort of point to a path forward on fixing make revise-* too? (which works as ../julia runtests.jl --revise *, but gets tricked by the isolation and lack of support for --project when run with make)

@Keno Keno merged commit 9729f31 into master Nov 14, 2023
6 of 9 checks passed
@Keno Keno deleted the kf/loadingtestfix branch November 14, 2023 01:14
@giordano giordano removed the status:merge me PR is reviewed. Merge when all tests are passing label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test This change adds or pertains to unit tests
Projects
None yet
3 participants