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-functional-tests:flakes / flake-in-submodule failed #12273

Closed
2 tasks done
minhtrancccp opened this issue Jan 16, 2025 · 1 comment
Closed
2 tasks done

nix-functional-tests:flakes / flake-in-submodule failed #12273

minhtrancccp opened this issue Jan 16, 2025 · 1 comment
Assignees
Labels

Comments

@minhtrancccp
Copy link

minhtrancccp commented Jan 16, 2025

Describe the bug

as my machine compiled the latest nix commit while rebuilding nixos, nix-functional-tests failed with the flake-in-submodule test

Steps To Reproduce

  1. set up nix flake input and configuration.nix as follows:
# `flake.nix`
inputs.nix.url = "github:nixos/nix";
## then include `inputs` as one of `specialArgs` in `outputs`

# `configuration.nix`
nix.package = inputs.nix.packages.${system}.default;
  1. run nix flake update and ensure flake.lock looks similar to the following:
    "nix": {
      "locked": {
        "lastModified": 1736979915,
        "narHash": "sha256-GqR1/TryOjTGBQD3I9oQYekARH5GvlZamSx4VAArVuY=",
        "owner": "nixos",
        "repo": "nix",
        "rev": "0c101679b4c23fdcd27c4f5be42586aa0beff00f",
        "type": "github"
      },
    },
  1. run nixos-rebuild test

  2. the error is encountered, more details here

Expected behavior

no tests in nix-functional-tests should have failed

Metadata

nix-env (Nix) 2.26.0pre

Additional context

this test seems to have failed since commit e02026a, authored by @edolstra and @Ericson2314. here is the exact error log

Checklist


Add 👍 to issues you find important.

@minhtrancccp minhtrancccp changed the title flake-in-submodule test failed nix-functional-tests:flakes / flake-in-submodule test failed Jan 16, 2025
@minhtrancccp minhtrancccp changed the title nix-functional-tests:flakes / flake-in-submodule test failed nix-functional-tests:flakes / flake-in-submodule failed Jan 16, 2025
@edolstra edolstra self-assigned this Jan 16, 2025
@edolstra
Copy link
Member

I think this was caused by a bad interaction between #12107 (which added a test asserting that libfetcher depends on the cwd, which is very wrong) and #12254 (which resolves git+file: paths early). It seems to have gone away magically thanks to #10089 (since flake.cc no longer calls parseFlakeRef() with a baseDir, so relative git+file: paths are preserved).

edolstra added a commit to DeterminateSystems/nix-src that referenced this issue Jan 16, 2025
edolstra added a commit to DeterminateSystems/nix-src that referenced this issue Jan 16, 2025
mergify bot pushed a commit that referenced this issue Jan 17, 2025
#12273 (comment)
(cherry picked from commit 938f0f4)

# Conflicts:
#	src/libflake/flake/flakeref.cc
#	tests/functional/flakes/flakes.sh
bryango pushed a commit to bryango/nix that referenced this issue Jan 17, 2025
bryango pushed a commit to bryango/nix that referenced this issue Jan 17, 2025
bryango pushed a commit to bryango/nix that referenced this issue Jan 17, 2025
bryango pushed a commit to bryango/nix that referenced this issue Jan 17, 2025
bryango pushed a commit to bryango/nix that referenced this issue Jan 18, 2025
bryango pushed a commit to bryango/nix that referenced this issue Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants