-
Notifications
You must be signed in to change notification settings - Fork 162
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
Fix the broken --strict
option to BuildPackages.sh
, but only if --parallel
is not also specified
#4386
Conversation
Evidence that this works is given by the failing macOS job now actually failing at the appropriate point. But... urgh, unfortunately the Cygwin job is now also failing, because the |
54228dc
to
59c8eb6
Compare
I started fixing this, but the fix grew kept growing, and I'm not convinced it's going to work correctly on all systems (as there can be subtle differences between bash versions). Therefore my suggestion is to just remove this bit of parallel code that builds packages in parallel. We can leave in the--parallel option and have it still turn on "MAKEFLAGS=-j3", which still helps speed up packages like semigroups (which is where most of the time is spent), the only loss is parallelising running things like configure scripts. Anyone who really wants to build packages in parallel can do it themselves still with something like this (which we only don't use as you have to install "parallel")
|
I think that's a reasonable solution. Would this also be a reasonable solution?: Accept this PR, with an additional check at the start of the script that at most one of Note that (at least my impression is that) the Somewhat related: is there any reason not to do |
4778041
to
8f260c9
Compare
By the way, in my opinion we should just use
Sure, the |
I'd be happy to require GNU parallel if the script properly checks for its presence and prints a helpful error message if it isn't there. |
8f260c9
to
2b11fa4
Compare
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.
Thanks for the explanations!
So, my understanding is that strict mode is currently broken if --parallel
is used. Can we then at least check for both being used at the start of the script, and produce an error that this is currently not supported?
So this fails now in the cygwin64 job -- and this is issue existed before, and is revealed by this PR here (so yeah, it does its job). See e.g. /~https://github.com/gap-system/gap/pull/4373/checks#step:5:1067 for another PR where the same issue occurs, it just isn't reported. This is the error (also reported as gap-packages/profiling#90):
This may be a hint at the "new(ish)" package build system based on Anyway, this also means it would really be useful to have cygwin tests for packages, too, at least for "central" ones like |
I've started to investigate Cygwin tests for IO: gap-packages/io#97 |
gap-system#4384 The addition of the --parallel option to the bin/BuildPackages.sh script unfortunately broke the operation of the --strict option. This restores the functionality of --strict when --parallel is not used. I am not 1337 enough to work out how to do catch the error codes of parallel background processes!
2b11fa4
to
d16fecb
Compare
I have pushed a change which throws an error if I also fixed the part where the script tests that it is not being run from in GAP's |
@wilfwilson wow, thanks for catching that. Regarding gap-packages/io#97, I left a few comments there, but overall io seems to work -- in any case, it builds fine, and so does it here. What does not build is the |
I was thinking the same on my bike ride this morning. |
The Hmmm, which One way to deal with that would be to locate the "bad" gmake.exe and simply remove it. |
@ChrisJefferson fixed the failing Cygwin job via gap-actions/setup-cygwin#7 – I've re-run the CI and the Cygwin job passed! So when the rest of the CI has passed, I will merge this, and open a feature request issue asking for |
--strict
option to the bin/BuildPackages.sh
script--strict
option to BuildPackages.sh
, but only if --parallel
is not also specified
See #4384.
The addition of the
--parallel
option to thebin/BuildPackages.sh
script in #3922 unfortunately broke the operation of the--strict
option. This is because the compilation of each package was put into a background process, and its exit code was no longer being checked.This restores the functionality of
--strict
when--parallel
is not used. I am not sure how to catch the error codesof parallel background processes – so, if would like help with this, please.
Text for release notes
Restore the broken
--strict
option toBuildPackages.sh
, but only if--parallel
is not also specified.(End of text for release notes)