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

separate module context for Compiler.jl tests #56636

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

aviatesk
Copy link
Member

xref: #56632 (review)

This also allows us to execute each file standalone, which might be useful for debugging.

@KristofferC
Copy link
Member

Also need an InteractiveUtils.@activate in every file? And maybe that shouldn't double run on the same worker (in case the tests are executed in parallel in the future).

@aviatesk
Copy link
Member Author

When these files are run from test/runtests.jl, we usually want to test Base.Compiler, and in that case, we shouldn't call @activate Compiler. I think the current situation is just fine, where we only have @activate Compiler in Compiler/test/runtests.jl, which is an entry point to test Compiler.jl as the standard library.

@KristofferC
Copy link
Member

where we only have @activate Compiler in Compiler/test/runtests.jl, which is an entry point to test Compiler.jl as the standard library.

Okay but in the future, we will likely run these tests in parallel on different workers and each of these workers needs to run the @activate command (I presume).
So that's why I was thinking something like

isdefined(Main, :ImmutableArrays) || @eval Main include("testhelpers/ImmutableArrays.jl")
would be needed in all files because we do not know what files will run on what worker and in what order they will run.

But could be a later thing to add.

@aviatesk
Copy link
Member Author

Yes, it’s probably related to parallel execution, so it might be a good idea to revisit this discussion in a PR that enables parallel execution for Compiler.jl/test/runtests.jl.

Keno and others added 4 commits November 22, 2024 01:28
Makes `test Compiler` work properly (as in use the Compiler package,
not Base.Compiler) and pass tests, but still needs to be made
parallel in a follow-on.
Co-authored-by: Kristoffer Carlsson <[email protected]>
xref: <#56632 (review)>

This also allows us to execute each file standalone, which might be
useful for debugging.
@aviatesk aviatesk force-pushed the avi/separate-compiler-test-context branch from b4acc79 to a150de9 Compare November 21, 2024 16:31
Copy link
Member

@Keno Keno left a comment

Choose a reason for hiding this comment

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

I'm ok with the setup_compiler change. For the module wrapping though, the Base test infrastructure does that internally, so I'm not sure it will be required once we switch to that (which we need to for parallel execution).

Base automatically changed from kf/compilertests to master November 21, 2024 22:21
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