-
Notifications
You must be signed in to change notification settings - Fork 239
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
Throw better error when conf files are missing #1030
Conversation
Previously, if some directories were missing .conf files, an error like this would be thrown: cp: missing destination file operand after '/nix/store/pnmrz06g0sa4s3yx53hgmr9k8jrh6ww0-ouroboros-network-framework-lib-ouroboros-network-framework-0.1.0.0-haddock-config/lib/ghc-8.6.5/package.conf.d' While normally this shouldn't occur, I've seen it happen in CI anyways, with the problem disappearing if the store path that's missing the files was rebuilt a couple times. With this commit, it becomes much easier to figure out which store path is missing the files, which would be very hard to figure out from the previous message.
if (( ''${#files[@]} )); then | ||
cp -f "''${files[@]}" $out/${packageCfgDir} | ||
else | ||
echo "$l/package.conf.d didn't contain any *.conf files!" |
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 no exit 1
here?
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.
Oh yeah, must've missed that
I was looking into some of the other checks we have put in place to try catch this early and noticed that the ones in |
This is mostly so that it will be cached at ifdLevel 1 as it is needed for eval of ifdLevel 2
This is mostly so that it will be cached at ifdLevel 1 as it is needed for eval of ifdLevel 2
This is mostly so that it will be cached at ifdLevel 1 as it is needed for eval of ifdLevel 2
Thanks a lot! |
* Throw better error when conf files are missing Previously, if some directories were missing .conf files, an error like this would be thrown: cp: missing destination file operand after '/nix/store/pnmrz06g0sa4s3yx53hgmr9k8jrh6ww0-ouroboros-network-framework-lib-ouroboros-network-framework-0.1.0.0-haddock-config/lib/ghc-8.6.5/package.conf.d' While normally this shouldn't occur, I've seen it happen in CI anyways, with the problem disappearing if the store path that's missing the files was rebuilt a couple times. With this commit, it becomes much easier to figure out which store path is missing the files, which would be very hard to figure out from the previous message.
Previously, if some directories were missing .conf files, an error like
this would be thrown:
While normally this shouldn't occur, I've seen it happen in CI anyways,
with the problem disappearing if the store path that's missing the files
was rebuilt a couple times.
With this commit, it becomes much easier to figure out which store path
is missing the files, which would be very hard to figure out from the
previous message.
Hopefully this helps with debugging future such random failures.