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

Circular flake import error when not circular #4811

Open
andir opened this issue May 15, 2021 · 3 comments
Open

Circular flake import error when not circular #4811

andir opened this issue May 15, 2021 · 3 comments

Comments

@andir
Copy link
Member

andir commented May 15, 2021

Describe the bug

When I have a directory structure that has at least two directories with the same name nested in it where each of the folders contains a flake.nix:

  /flake.nix
  /a/flake.nix
  /a/a/flake.nix

When given a minimal flake.nix for each of them (except for the last one in a/a) like this:

{
  inputs.a.url = "path:./a";
  outputs = { a, self }: {};
}

The nix flake metadata command in the root fails like this:

error: found circular import of flake 'path:./a'

       … while updating the flake input 'a/b'

       … while updating the flake input 'a'

       … while updating the lock file of flake 'path:/home/andi/.../a?narHash=....'

It is complaining about a circular import which isn't one. It appears as if the circular dependency detection is working based on the input string and not on some normalized absolute path.

Expected behavior

I would except to be able to nest flakes in a few directories to keep implementation details for packages in sub-flakes where they are being maintained.

nix-env --version output

nix-env (Nix) 2.4pre20210326_dd77f71

Additional context

There was an issue about circular dependencies that claims that they are now supported but apparently they are not supported anymore?

@andir andir added the bug label May 15, 2021
@stale
Copy link

stale bot commented Nov 16, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Nov 16, 2021
@jaen jaen mentioned this issue Nov 27, 2022
9 tasks
@roberth roberth added the flakes label Oct 23, 2023
@roberth roberth added this to Nix team Oct 23, 2023
@fricklerhandwerk
Copy link
Contributor

Triaged in Nix team meeting:

@fricklerhandwerk fricklerhandwerk moved this to ⏰ Postponed in Nix team Oct 27, 2023
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-10-27-nix-team-meeting-minutes-98/34695/1

@thufschmitt thufschmitt removed this from Nix team Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants