-
-
Notifications
You must be signed in to change notification settings - Fork 20.2k
npc: init at 1.0.0 #543008
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
Merged
+40
−0
Merged
npc: init at 1.0.0 #543008
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| { | ||
| lib, | ||
| rustPlatform, | ||
| fetchFromGitHub, | ||
| git, | ||
| nix, | ||
| nix-update-script, | ||
| }: | ||
| rustPlatform.buildRustPackage (finalAttrs: { | ||
| pname = "npc"; | ||
| version = "1.0.0"; | ||
|
|
||
| __structuredAttrs = true; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "samestep"; | ||
| repo = "npc"; | ||
| tag = "v${finalAttrs.version}"; | ||
| hash = "sha256-qgg1WwxcpqxmK+xchIWbGQ/EXUJdYje9++CziTFnmtA="; | ||
| }; | ||
|
|
||
| cargoHash = "sha256-cxkVBKqFmlHjUrmx2jbGmGgrrZLpVmi/o6HzDKckudQ="; | ||
|
|
||
| env = { | ||
| GIT_BIN = lib.getExe git; | ||
| NIX_BIN = lib.getExe nix; | ||
| }; | ||
|
|
||
| passthru.updateScript = nix-update-script { }; | ||
|
|
||
| meta = { | ||
| description = "Nixpkgs channel history CLI"; | ||
| homepage = "https://github.com/samestep/npc"; | ||
| license = lib.licenses.mit; | ||
| maintainers = with lib.maintainers; [ | ||
| samestep | ||
| me-and | ||
| ]; | ||
| }; | ||
| }) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this is wrong; see samestep/npc#6. What do you think is the best solution here?
staging.npcitself.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spotted that; I'd assumed (perhaps naively) that the bug was at least rare, so it'd be fine to just live with it until it gets fixed in the Git source code.
That said, I rather expect submitting Jonathan Tan's one-line patch as a properly formatted patch to the Git mailing list would get it accepted. And once there's a patch on the mailing list, regardless of whether it's accepted or not, I think it'd be reasonable to add it to the Nixpkgs Git package.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been several months since I've tried running
npdwith Git 2.48+, but if I remember correctly, I was hitting the bug pretty consistently before I pinned the older Git version. If it's not too much to ask, would you be able to try it out on your end to see if you hit it?Yeah I think you're right 😅 to be honest, I've had this on my TODO list for months now. Obviously the patch itself is super easy, but then I'd also have to include a regression test, and I just haven't gotten around to understanding the Git codebase's testing setup well enough to feel confident in writing and sending it...
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I just ran the following and didn't hit the problem in any of the ten test clones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, the initial clone works fine; it's the
git fetchthat gives the error. Although, I did also recently change how the fetching works in samestep/npc@8d5e25b, so maybe it avoids the bug now somehow? I'd be surprised though.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that was 50 runs without reproducing the bug with git v2.54.0! I'll test with v2.49 now, just to be sure it's not an environmental issue...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow! And I assume this is after the more recent change to how
npcfetches? If you want, it may also be useful to try with annpccommit prior to that change.I'll look into sending that patch on the Git mailing list later today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'm not managing to reproduce the problem with git v2.49.0 either. Specifically, I've just run the following and didn't see any issues:
So I don't think we can conclude anything from my testing other than there's some environmental factor at play :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for testing! I'll do some more testing on my end later today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And as a slightly different datapoint: I just rebuilt a couple of my machines using
npcfrom your flake, but with both nixpkgs and nixpkgs-git pinned to a recent nixpkgs-unstable. Twenty runs ofnpc fetchon two different systems and I didn't see anything untoward.