-
Notifications
You must be signed in to change notification settings - Fork 11
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
Selecting pollen package results in infinite recursion #301
Comments
I know this software isn't maintained anymore, but could you confirm I'm going for the right approach here? That would help me trying to find a solution. |
So I went through all depdencies of Pollen to see if any of them to see if any of them are the cause of the infinite recursion. It seems that
I tested these libraries by replacing |
I'm delighted to see someone making use of racket2nix, and I will try to make this work for you. :-) Thank you for the thorough report! You're going about it the right way, and the problem is the homegrown circular dependency detection that racket2nix uses. I've been thinking of implementing Tarjan's algorithm in pure Nix, so that it could benefit others in the Nix ecosystem, and also be able to dynamically detect new cycles (or removed cycles) in packages brought in or modified by overlays. But if you are running into issues right now, the quicker way would be to improve the cycle detection in racket2nix by using |
The quicker-quicker way would be to identify the precise issue with I'll look at it this weekend, but if you want to get ahead faster, you could look at Here's what happens when racket2nix encounters a cycle, have a look at
If you can identify what racket2nix is doing wrong in this specific case, then you can add overrides to the overlay for doing it right. |
It seems the issue is around the very example I picked:
So something depended on by alexis-util and friends refers back to the cycle (is it backport-template-pr1514?), but racket2nix doesn't detect it. |
I looked briefly at |
Thanks for digging into this! That are some good hints, if I have the time I will look into this too and try to understand what's going on this weekend. |
Ok I think I made some progress here. After wrangling around in
Here is the patch just in case I will remove my repository in the future: patch.zip |
Interesting 😄 |
The problem you're seeing there is that you have the |
$ cat depgraph.rkt
#lang racket
(define catalog (read))
(printf "digraph {\n")
(for ([(name package) (in-hash catalog)])
(for ([dependency (hash-ref package 'dependency-names)])
(printf "\"~a\" -> \"~a\"\n" name dependency)))
(printf "}\n") $ racket depgraph.rkt < catalog.rktd > catalog.dot
$ grep -vFf <(grep reverseCircular.*compatibility racket-packages.nix | tr '[[:blank:]]' '\n' | sed -ne 's/"\([^"]*\)"/\1/p') < catalog.dot > catalog0.dot
$ old_i=0; old_len=$(wc -l < catalog$old_i.dot); for i in {1..9} {a..z}; do grep -Ff <(awk '/->/ { print "-> " $1 } END { print "{"; print "}" }' catalog$old_i.dot) catalog$old_i.dot | grep -Ff <(awk '/->/ { print $3 " ->" } END { print "{"; print "}" }' catalog$old_i.dot) > catalog$i.dot; len=$(wc -l < catalog$i.dot); wc -l catalog$i.dot; (( old_len == len )) && break; old_len=$len; old_i=$i; done
$ dot -Tpng < catalogg.dot > catalogg.png # and that's the above graph |
Thank you @clacke! |
Now that Pollen builds correctly from source (#269) I would like to integrate it into my deployment setup. That means, I need a Pollen derivation I can reference in the derivation that builds my website. I'm assuming that the way to obtain the pollen derivation would be this:
But this gives me (running
nix-build --show-trace
):😢
Sidenote: I tried another way to obtain a pollen derivation by fetching the Pollen source from GitHub and putting that into
buildRacketPackage
, but that didn't work. I can describe what I found out trying to get that to work, but because the previous approach seems to be the right one, I'll omit that for now.The text was updated successfully, but these errors were encountered: