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

python3.tests.nix-pythonprefix-mypy: Avoid unnecessary rebuilds #319888

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

infinisil
Copy link
Member

Description of changes

E.g. when the Nix is changed, see #301014

Things done

  • Built python3.tests.nix-pythonprefix-mypy on x86_64-linux

Add a 👍 reaction to pull requests you find important.

Copy link
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ diff -r -u4 /nix/store/gq6b77q97cpsbxs8rx070wfl533s4lpw-typeddep /nix/store/rsbc8gc512fmsamc8n383x97ixf0sics-source
Only in /nix/store/gq6b77q97cpsbxs8rx070wfl533s4lpw-typeddep: default.nix

I had to build this specific derivation with this command, btw:

nix-build --expr 'let p = import ./. { }; in p.python3.pkgs.callPackage pkgs/development/interpreters/python/tests/test_nix_pythonprefix/typeddep/default.nix { }'

@infinisil
Copy link
Member Author

I mentioned the attribute that builds this in the description :P

@philiptaron
Copy link
Contributor

I mentioned the attribute that builds this in the description :P

The derivation mentioned definitely causes this package to be built, but it doesn't directly show it, so my workflow of nix derivation show to find the inputSrc and diff it vs. what's on master right now didn't work.

@infinisil
Copy link
Member Author

Here's a hack to print excluded files by default :P:

diff --git a/lib/fileset/default.nix b/lib/fileset/default.nix
index bb327226731e..32bfcf21ecf6 100644
--- a/lib/fileset/default.nix
+++ b/lib/fileset/default.nix
@@ -123,6 +123,7 @@ let
     isPath
     pathExists
     seq
+    trace
     typeOf
     nixVersion
     ;
@@ -473,6 +474,8 @@ in {
             - Set `fileset` to a file set that cannot contain files outside the `root` (${toString root}). This could change the files included in the result.''
     else
       seq sourceFilter
+      trace "lib.fileset.toSource: These files are excluded:"
+      seq (_printFileset (_difference (_singleton root) fileset))
       cleanSourceWith {
         name = "source";
         src = root;

@mweinelt mweinelt merged commit fddf4fb into NixOS:master Jun 15, 2024
22 checks passed
@infinisil infinisil deleted the rep-python-test branch June 15, 2024 00:38
wattmto-nixpkgs-automation bot pushed a commit to wattmto/nixpkgs that referenced this pull request Jun 15, 2024
python3.tests.nix-pythonprefix-mypy: Avoid unnecessary rebuilds
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