-
-
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
Respect startup-file flag in Pkg.build and Pkg.test #22094
Conversation
probably worth adding a startup_file kwarg so you could turn this back on if you wanted (defaulting to off is better 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.
This does not fix #21823 since it still doesn't "respect --startup-file=no" .
I'll add @tkelman's suggestion to support loading the startup file through a keyword. |
After thinking about it more I think think we shouldn't support a |
Although the title of the issue wants |
I'm thinking about deployments in unusual environments that may be using juliarc to set up custom library paths, that kind of thing. I wouldn't think it would be a commonly used flag, but I don't see an issue with exposing that separate processes are getting launched. If that changes we can deprecate the keyword arguments - we already have one for code coverage which is a similar situation. |
A good point. Since several Pkg functions eventually call It seems that the easiest solution would be to just respect the |
The |
This version seems like an improvement over what we've got now at least (and would make a little more sense to consider backporting even, as opposed to new keyword args). Could use a test though. |
Is it safe to temporarily modify |
could set HOME in a |
base/pkg/entry.jl
Outdated
@@ -719,7 +720,7 @@ function test!(pkg::AbstractString, | |||
--compilecache=$(Bool(Base.JLOptions().use_compilecache) ? "yes" : "no") | |||
--check-bounds=yes | |||
--startup-file=$(Base.JLOptions().startupfile != 2 ? "yes" : "no") | |||
$test_path | |||
--eval $code |
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 is this change necessary?
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.
Not strictly necessary but evalfile
does make the "runtests.jl" file run inside of a module which means variables defined within the startup-file can only be accessed via Main.*
. I made this modification to make it harder to accidentally reference a variable within the tests which was defined or imported by the startup-file.
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.
that did necessitate the messy escape_string business 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.
is running the runtests.jl inside a module via evalfile going to result in any packages' tests behaving differently?
the appveyor timeouts look like redirection to a file was necessary |
Looks like for Windows you need to set |
33bb3ce
to
6785184
Compare
I'll try to sort out the issues tomorrow |
Flags given to subprocesses are now alphabetized.
605c4d3
to
e235353
Compare
Resolved the following issues:
|
Ready to merge |
I'll merge this today unless there are objections. I need to close one of the 1800 issues ;) |
had a now-collapsed question on the change to using evalfile
I guess we'll find out, but I'm a bit concerned if packages will notice the change. |
Packages which assume the tests are running in the |
I'll make a NEWS entry to make debugging this change easier. |
In that case I don't personally think this (edit: just the evalfile part) behavior change to Pkg.test is worth the disruption - CI will virtually never have a juliarc, after all. |
@tkelman Are you referring to just the |
Package tests really shouldn't be assuming |
Right, the change in which module things run in (the |
I'd like to get the juliarc isolation included but I can accept that it is a controversial change. I'll remove that change from this PR so the remainder of the changes can at least be merged. |
Sorry, yes, propagating |
LGTM now, though the NEWS bit should move to where the evalfile change goes |
Thanks. I just noticed that myself. |
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.
+1 to merge if CI is green
Fixes #21823 since
Pkg.update
callsPkg.build