Skip to content

Comments

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

Merged
mweinelt merged 1 commit intoNixOS:masterfrom
tweag:rep-python-test
Jun 15, 2024
Merged

python3.tests.nix-pythonprefix-mypy: Avoid unnecessary rebuilds#319888
mweinelt merged 1 commit intoNixOS:masterfrom
tweag:rep-python-test

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.

@infinisil infinisil requested review from FRidh and adisbladis June 14, 2024 19:30
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jun 14, 2024
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.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jun 14, 2024
@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;

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jun 14, 2024
@mweinelt mweinelt merged commit fddf4fb into NixOS:master Jun 15, 2024
@infinisil infinisil deleted the rep-python-test branch June 15, 2024 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants