Skip to content

Warn against the use of relative 'git+file:' flake inputs#12277

Merged
edolstra merged 2 commits intoNixOS:masterfrom
DeterminateSystems:warn-relative-git
Jan 17, 2025
Merged

Warn against the use of relative 'git+file:' flake inputs#12277
edolstra merged 2 commits intoNixOS:masterfrom
DeterminateSystems:warn-relative-git

Conversation

@edolstra
Copy link
Copy Markdown
Member

Motivation

Make sure that users know that use of relative git+file: inputs is not supposed to work.

Context

See #12107 for more discussion.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added the fetching Networking with the outside (non-Nix) world, input locking label Jan 16, 2025
"This is not supported and will stop working in a future release.",
url);
}
repoInfo.url = std::filesystem::absolute(url.path).string();
Copy link
Copy Markdown
Member

@bryango bryango Jan 17, 2025

Choose a reason for hiding this comment

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

Is this still necessary after #12254? If not, we can simply drop it. The absolute(url.path) fix was proposed before #12254. It seems this is still necessary for flake inputs. I think the warning is great as it helps people migrate to other configurations.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, it's still needed. Only CLI arguments are absolutized.

@edolstra edolstra enabled auto-merge January 17, 2025 11:35
@edolstra edolstra merged commit 43a170a into NixOS:master Jan 17, 2025
@edolstra edolstra deleted the warn-relative-git branch January 17, 2025 11:49
roberth added a commit that referenced this pull request Jan 21, 2025
Backport git+file:./ fixes to 2.24 (#12107 + #12277)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fetching Networking with the outside (non-Nix) world, input locking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants