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

nix: optimize caching by delaying setGitRev and other nix fixes #4748

Merged
merged 14 commits into from
Jan 18, 2023

Conversation

jbgi
Copy link
Contributor

@jbgi jbgi commented Jan 4, 2023

other simplification/optimization:

  • better filtering of haskell.nix project src
  • remove generated project-packages-exes.nix (now at eval time)
  • move rewrite-libs to binary-release.nix: not needed and faster for normal builds
  • use haskell.nix project overlays to simplify access to components and alternative projects config (profiled, etc.).

With this, lots for derivation become much less sensible to rebuild for unrelated changes. It should also prevent lots of now unnecessary cache downloads, making cicero faster.

Also include a fix for hls (fixing nix develop).

@jbgi jbgi requested review from a team, deepfire, mgmeier and fmaste as code owners January 4, 2023 13:46
@jbgi jbgi changed the title nix: optimize caching by delaying setGitRev nix: optimize caching by delaying setGitRev and other nix fixes Jan 4, 2023
@blaggacao
Copy link
Contributor

blaggacao commented Jan 4, 2023

Cross referencing a different stream of thought/work that also tries to deal with "laconic commits" ending up invalidating cache (in that case) via inputs.self.rev...

divnix/std#228

Also https://tvl.fyi uses josh-project to isolate commit trees. I do see a potential future link here for rev & ref when working with mono repos, whether that will be in Nix itself or in additional tooling.

@jbgi jbgi force-pushed the nix-caching-improvements branch 4 times, most recently from 75f405e to bd1daa1 Compare January 11, 2023 08:25
nix/haskell.nix Outdated Show resolved Hide resolved
nix/haskell.nix Outdated Show resolved Hide resolved
nix/pkgs.nix Outdated Show resolved Hide resolved
@jbgi jbgi force-pushed the nix-caching-improvements branch 4 times, most recently from aa9522d to 1791c0c Compare January 12, 2023 14:08
@jbgi jbgi mentioned this pull request Jan 12, 2023
@jbgi
Copy link
Contributor Author

jbgi commented Jan 12, 2023

could some on mac test that cardan-node static binary in
nix build .#hydraJobs.x86_64-darwin.cardano-node-macos is still working correcty?

 other simplification/optimization:
  - remove generated project-packages-exes.nix (now at eval time)
  - move rewrite-libs to binary-release.nix: not needed and faster for normal builds
  - use haskell.nix project overlays to simplify access to components and alternative projects config (profiled, etc.).
  - filter src to avoid rebuilds for test that depends on $CARDANO_NODE_SRC
@jbgi jbgi force-pushed the nix-caching-improvements branch 3 times, most recently from 879afe5 to 522bc93 Compare January 18, 2023 11:40
@jbgi
Copy link
Contributor Author

jbgi commented Jan 18, 2023

bors try

iohk-bors bot added a commit that referenced this pull request Jan 18, 2023
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jan 18, 2023

try

Build succeeded:

@jbgi
Copy link
Contributor Author

jbgi commented Jan 18, 2023

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jan 18, 2023

Build succeeded:

@iohk-bors iohk-bors bot merged commit ff98f05 into master Jan 18, 2023
@iohk-bors iohk-bors bot deleted the nix-caching-improvements branch January 18, 2023 22:57
iohk-bors bot added a commit that referenced this pull request Jan 24, 2023
4778: Nix fixes - 1.35 r=disassembler a=jbgi

this is a backport of #4748.

Co-authored-by: Jean-Baptiste Giraudeau <jb@giraudeau.info>
Co-authored-by: John Ky <john.ky@iohk.io>
Co-authored-by: Marcin Szamotulski <coot@coot.me>
iohk-bors bot added a commit that referenced this pull request Jan 24, 2023
4778: Nix fixes - 1.35 r=disassembler a=jbgi

this is a backport of #4748.

Co-authored-by: Jean-Baptiste Giraudeau <jb@giraudeau.info>
Co-authored-by: John Ky <john.ky@iohk.io>
Co-authored-by: Marcin Szamotulski <coot@coot.me>
iohk-bors bot added a commit that referenced this pull request Jan 24, 2023
4778: Nix fixes - 1.35 r=disassembler a=jbgi

this is a backport of #4748.

Co-authored-by: Jean-Baptiste Giraudeau <jb@giraudeau.info>
Co-authored-by: John Ky <john.ky@iohk.io>
Co-authored-by: Marcin Szamotulski <coot@coot.me>
iohk-bors bot added a commit that referenced this pull request Jan 24, 2023
4778: Nix fixes - 1.35 r=disassembler a=jbgi

this is a backport of #4748.

Co-authored-by: Jean-Baptiste Giraudeau <jb@giraudeau.info>
Co-authored-by: John Ky <john.ky@iohk.io>
Co-authored-by: Marcin Szamotulski <coot@coot.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants