-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
workspace command: fix for missing incremental support #21714
Conversation
would this fix #21920 ? |
not sure. it fixed tests for some package, but I seem to have forgotten to list the bug number |
I can confirm that this fixes #22101. We should definitely have a test for this though. |
9eca425
to
7a74183
Compare
Hm, Windows apparently doesn't like my test. |
test/workspace.jl
Outdated
""") | ||
write(joinpath(dir, "testdriver.jl"), """ | ||
insert!(LOAD_PATH, 1, "$dir") | ||
insert!(Base.LOAD_CACHE_PATH, 1, "$dir") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to insert repr(dir)
here rather than "$dir"
test/workspace.jl
Outdated
end | ||
exit(isdefined(Main, :f22101) ? 0 : 1) | ||
""") | ||
@test success(`$(Base.julia_cmd()) --startup-file=no --precompile=yes $(joinpath(dir, "testdriver.jl"))`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want to pass DevNull, STDOUT, and STDERR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass them to what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess success
doesn't take them as arguments, so to pipeline
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do DevNull, STDOUT, and STDERR need to be specified? I'm not super familiar with how the piping stuff works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default is to swallow all stdio, which is why the windows failure didn't print anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so passing it helps with debugging the test
fbd56c3
to
f0c058a
Compare
test/workspace.jl
Outdated
exit(isdefined(Main, :f22101) ? 0 : 1) | ||
""") | ||
# Ensure that STDIO doesn't get swallowed (helps with debugging) | ||
cmd = `$(Base.julia_cmd()) --startup-file=no --precompile=yes $(joinpath(dir, "testdriver.jl"))` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no --precompile
flag, there is a --precompiled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, thanks. I probably should have --compilecache=yes
to ensure that the module in the tests gets precompiled, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess in case julia_cmd
tries to set that flag to no, maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't hurt to add it anyway, I suppose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think --precompiled=yes
may be unnecessary, since it's the precompiled module we care about. (Unless I'm misunderstanding the flag.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sysimg might be irrelevant for this test, not positive though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sysimg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--precompiled
is about whether or not the precompiled system image is used - you almost always want that these days, except maybe on win32 or freebsd if you want better backtraces in exchange for slower startup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, thanks
f0c058a
to
bf33284
Compare
Okay to merge once CI passes? |
I can't really spend the time to analyze the consequences of calling
workspace()
, but this at least makes it not fail too quickly.