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

Draft of following flake-lang everywhere #193

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jaredponn
Copy link
Collaborator

@jaredponn jaredponn commented Feb 8, 2024

More putting follows everywhere.

Before this PR:

$ time nix flake lock

real	0m1.152s
user	0m1.112s
sys	0m0.035s

$ cat flake.lock | jq '.nodes | keys' | awk -e 'BEGIN { i = 0 } /nixpkgs/ { i++ } END {print i} '
149

EDIT: we don't have such nice performance anymore -- see below
After this PR:

$ time nix flake lock
real	0m0.752s
user	0m0.676s
sys	0m0.060s

$ cat flake.lock | jq '.nodes | keys' | awk -e 'BEGIN { i = 0 } /nixpkgs/ { i++ } END {print i }'
115

flake.nix Show resolved Hide resolved
Copy link
Collaborator

@bladyjoker bladyjoker left a comment

Choose a reason for hiding this comment

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

Thanks! If you could make sure the lb-cardano-demo works when these changes are done that would be great. It's basically our only canary test :D

@jaredponn jaredponn force-pushed the jared/follow-flake-lang-as-much-as-possible branch from 1a1c6c7 to 1192cc6 Compare February 13, 2024 17:45
@jaredponn jaredponn force-pushed the jared/follow-flake-lang-as-much-as-possible branch 2 times, most recently from af9aa8e to 53ff09f Compare February 13, 2024 18:01
@jaredponn
Copy link
Collaborator Author

jaredponn commented Feb 13, 2024

Okay, some final numbers

$ time nix flake lock
real	0m12.575s
user	0m12.342s
sys	0m0.264s

$ cat flake.lock | jq '.nodes | keys' | awk -e 'BEGIN { i = 0 } /nixpkgs/ { i++ } END {print i }'
375

Further work

If we want to get this to back to be the numbers in the original PR, we'll need to modify the plutus-ledger-api-rust since that's contributing a significant overhead e.g. the following patch

diff --git a/flake.nix b/flake.nix
index 792c091..5b02a10 100644
--- a/flake.nix
+++ b/flake.nix
@@ -39,10 +39,10 @@
     };
 
     # Rust runtime
-    plutus-ledger-api-rust = {
-      url = "github:mlabs-haskell/plutus-ledger-api-rust";
-      inputs.nixpkgs.follows = "nixpkgs";
-    };
+    # plutus-ledger-api-rust = {
+    #   url = "github:mlabs-haskell/plutus-ledger-api-rust";
+    #   inputs.nixpkgs.follows = "nixpkgs";
+    # };
   };
 
   outputs = inputs@{ flake-parts, ... }:

gives us the following

$ time nix flake lock

real	0m0.942s
user	0m0.852s
sys	0m0.066s

$ cat flake.lock | jq '.nodes | keys' | awk -e 'BEGIN { i = 0 } /nixpkgs/ { i++ } END {print i }'
117

(of course, we wouldn't want to just comment it out because we probably need it somewhere -- I'm fairly certain the problem is the cyclic reference from lambda-buffers to plutus-ledger-api-rust; and if we could remove the cyclic reference, we could make plutus-ledger-api-rust follow lambda-buffer's flake-lang to significantly reduce the flake.lock size.)

Copy link
Collaborator

@bladyjoker bladyjoker left a comment

Choose a reason for hiding this comment

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

Sorry for the delay!

@jaredponn jaredponn force-pushed the jared/follow-flake-lang-as-much-as-possible branch from 4a763e0 to 8f0eb6e Compare March 8, 2024 07:32
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

3 participants