Skip to content
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

maintainers/build: skip packages that don't evaluate #97647

Merged
merged 1 commit into from Sep 15, 2020

Conversation

erikarvstedt
Copy link
Member

@erikarvstedt erikarvstedt commented Sep 10, 2020

Motivation

build.nix fails when it selects packages that have disabled Python pkgs (like with disabled = !isPy3k;) as dependencies.

Example

nix-build --show-trace  maintainers/scripts/build.nix --argstr maintainer earvstedt
# Output
error: ... while evaluating ... 'python2.7-djangoql-0.14.0'
...
Django-2.2.15 not supported for interpreter python2.7

Explanation:
python27Packages.djangoql is not disabled but has the disabled Py3k-only dependency django.

Discussion

To check which pkgs should be built, build.nix only evaluates the meta.maintainers attribute of each pkg.
If the maintainer doesn't match or if evaluation of meta.maintainers fails, the package is skipped.
When a pkg is selected to be built but one of its dependencies is disabled the build fails.

The workaround to skip all packages whose closure doesn't evaluate is not ideal as this may ignore actual package defects.
But most of these potential eval failures should already get caught by ofborg before merging.

This is relevant for ZHF: #97479

I'll add a backport in case this PR gets merged.

@erikarvstedt
Copy link
Member Author

This is relevant for ZHF: #97479

@das-g
Copy link
Member

das-g commented Sep 10, 2020

Sorry, I don't think I'm qualified to review this change.

@jonringer
Copy link
Contributor

This is very similar to my fix #97571

not sure which one is preferred

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/should-we-conditionally-disable-dependees-of-conditionally-disabled-python-packages/8988/1

@jonringer
Copy link
Contributor

Mine was not working as intended, this seems to have the desired behavior.

Thanks @erikarvstedt

@jonringer jonringer merged commit be33b54 into NixOS:master Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants