-
Notifications
You must be signed in to change notification settings - Fork 67
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
nixpkgs-review doesn't differentiate between build and store errors. #415
Comments
Digging a little deeper, I found that nixpkgs-review thinks the build failed because Running that command directly, indeed I get e.g. Running I think it would be very helpful if |
I've been saying for years that it shouldn't be thrown at every PR especially if you don't know what you want to achieve with it.
cd into nixpkgs and try to build it
No. The builds could be flaky or your machine could be overloaded. You probably want to look in the logs above that where produced and then take a good guess.
So probably that store entry was corrupted for whatever reason.
What should it say that wouldn't be vague and unhelpful? A build can fail for many reasons and only compile errors are obvious. Everything else is needs good knowledge. |
The reason why build fails should be in the build logs. You can get nicer error reporting by installing nix-output-monitor. nixpkgs-review doesn't have any special build method that is different from running nix-build yourself. If it succeeds the second time, it is likely a flaky build. |
...
Hi @SuperSandro2000 , I'm not sure who the above is directed at but as I hope you can see these suggestions don't apply in this situation. As I wrote above, I've already tried to build it, and as you can see in the log I posted, there was no build log that would indicate the source of the error. So, these suggestions are not useful in this situation.
I was not using NixOS in this situation, and the program I was testing has a component that runs as root, so I wonder if it was something like automatically creating
A simple but good improvement would be something like:
|
They're not. Sorry, but did you read my follow-up comment? |
To clarify, the build didn't fail. It was just the method that @Mic92 Sorry but I think you were hasty to close this. |
@CyberShadow You seem to use a single-user installation of nix. I would recommend to install a multi-user nix version using the nix-daemon. Than also random programs can no longer modify store paths as you have seen |
nixpkgs-review currently uses this to check if a path has been build: nixpkgs-review/nixpkgs_review/nix.py Line 36 in 7e6150a
|
@Mic92 No, I'm using a multi-user installation of Nix.
Well, I regret starting the issue with "I'm a relatively new nixpkgs contributor", because all that did was create an invitation to skim over the issue description and hastily classify it as user error. Let's rephrase the problem: there are situations, other than build errors, which So, i think we should at least try to avoid incorrectly reporting this situation as a failed build.
Indeed, I have discovered this as well. I noticed that Are there any other ways we can discern a store path validation error from a legitimate build failure? |
I would accept a pull request that switches to a different build check command. I currently don't see this as a big priority that I would get to myself soonish, because it's quite rare that these things happen. |
Happy to provide a PR. Do we have a range of supported Nix versions? |
2.18 and newer. |
Hi, I'm a relatively new nixpkgs contributor. nixpkgs-review is advertised very visibly in the PR template, so I've been trying to use it for my own PRs.
However, one issue I have is that when nixpkgs-review reports that something failed to build, it doesn't provide any other information.
Today, while working on NixOS/nixpkgs#276662, I tried it on my own PR. I ran:
So, nixpkgs-review says that
libblockdev.python
andlibbytesize
failed to build.But, what can I do with this information, and what should I do about it?
I don't know why they failed to build, because there is no build log or other details.
If I try to build them manually, by running
nix-build -A libblockdev.python
andnix-build -A libbytesize
, that succeeds. So, clearlynixpkgs-review
builds them in some other way that causes that build to fail. But, how do I reproduce the problem?I see that
nixpkgs-review
printed a command that it ran in order to perform the build (nix build --nix-path ...
). But, if I try to copy and run this command, it succeeds as well.So, I'm stuck. The tool says there's a problem, but it's not giving any explanation, details, or a way to reproduce it.
The text was updated successfully, but these errors were encountered: