Open KiruyaMomochi opened 7 months ago
I've encountered something similar.
517501bcf14ae6ec47efd6a17dda0ca8e6d866f9
nix eval --impure --debug --show-trace --trace-function-calls
shows me this:
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456440872563
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456440946738
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:95 at 1703265456440954032
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:5 at 1703265456440960798
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456440967343
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456441069469
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456441076935
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456441096449
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456441103568
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456441179796
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:95 at 1703265456441187306
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:5 at 1703265456441199265
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456441206160
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456441282257
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456441290068
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456441306191
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456441313115
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456441398640
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:95 at 1703265456441409378
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:5 at 1703265456441429714
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456441439923
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456441597035
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456441610554
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456441637580
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456441650788
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456441876004
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:95 at 1703265456441889492
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:5 at 1703265456441902334
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456441914641
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456442162359
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456442175228
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456442218411
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456442232762
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456442359550
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:95 at 1703265456442379811
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:5 at 1703265456442400564
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456442409505
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456442692067
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456442705107
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456442743292
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456442755318
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456443023764
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:95 at 1703265456443034688
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:5 at 1703265456443044074
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456443052842
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456443326743
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456443337792
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456443356274
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456443365799
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:188:19 at 1703265456443639703
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:95 at 1703265456443649965
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:5 at 1703265456443659081
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456443667829
function-trace exited /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:20 at 1703265456443956018
function-trace entered /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix:192:48 at 1703265456443967684
I had this problem because I was passing a filtered fileset to projectDir
. I fixed it by passing the full folder to projectDir
and the filtered fileset to src
, not sure about the caching implications.
The template project passes the flake self
to projectDir
, which seems weird to me.
The problem is that this function from lib.nix
doesn't have a base case if there is no .git
, it just keeps adding /../
to the path forever:
# Find gitignore files recursively in parent directory stopping with .git
findGitIgnores = path:
let
parent = builtins.trace path (path + "/..");
gitIgnore = path + "/.gitignore";
isGitRoot = builtins.pathExists (path + "/.git");
hasGitIgnore = builtins.pathExists gitIgnore;
gitIgnores = if hasGitIgnore then [ gitIgnore ] else [ ];
in
lib.optionals (builtins.pathExists path && builtins.toString path != "/" && ! isGitRoot) (findGitIgnores parent) ++ gitIgnores;
Ran into the same issue @voidus described with a filtered fileset as an input to projectDir
.
Making things more complicated is that it sometimes works just fine, but has a stack overflow on CI.
I also ran into this issue.
Adding a README.md
didn't help, however replacing projectDir = self;
with projectDir = ./.;
in the template flake.nix
fixed this issue for me.
Describe the issue
The following code will cause a stack overflow
Additional context
flake.lock
: