Avoid mutable URL store path being too long - #245
Open
alfarelcynthesis wants to merge 1 commit into
Open
Conversation
Author
|
Can confirm that everything works as expected when compiled from my branch. |
Author
|
This will also affect |
Collaborator
|
I mean let's try this out. Though no version bump needed here, as the format itself did not change |
alfarelcynthesis
force-pushed
the
avoid-too-long-mutable-url-store-path
branch
from
July 27, 2026 15:12
737f5cd to
4e5d840
Compare
Author
|
Sounds good to me, and thanks for the clarification, wasn't sure when version bumps were useful/necessary. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes: #244
Not sure if there is a clearer/more idiomatic way to solve this.
A fix of some kind is needed to avoid the long names given by the use of fully resolved URLs and the inclusion of query parameters in
fetchurlname detection, since store paths have limited length (211 chars).Using the pin's name, which must (afaict) be supplied manually for mutable URLs, seems like a good compromise of should-always-work and is-accurate.
Of course, supplying a needlessly long name will still break this, but that's a reasonable "give very long pin name" -> "store path is too long" error, which seems like good enough UX.
I'm not familiar enough with npins to know if this is the correct way to bump the vendoreddefault.nixversion, but it does seem like it would be necessary here to cause a prompt about the change.This shouldn't actually be a breaking change, unless someone is actually relying on the store path for a mutable URL pin having a specific structure from the underlying URL... that seems like not really a part of the API contract, though.