-
-
Notifications
You must be signed in to change notification settings - Fork 17.5k
lib/types: check paths in pathWith with hasStorePathPrefix #387304
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
Conversation
64e1fda to
91e1d8d
Compare
a1fb950 to
153cc45
Compare
153cc45 to
7ffe181
Compare
|
the builds on contentAddressedByDefault are still broken despite the other two PRs being merged |
It is still blocked by at least this PR getting merged. So far I have opened an individual PR for every subsystem I touch, but perhaps it would be better to collect them all in a single PR. |
|
I'm merging into my own fork to try to update my system so I'll let you know if it worked at least |
|
it appears so, but it's going to take a while for it to churn all the packages and I have to leave my computer for a while |
|
yeah this removes the error on my machine. At this point I don't think it would be very useful to refactor the PRs, since two have already been in master for weeks 🤷 |
|
@illdefined I'm sorry but I don't know how to resolve a conflict in someone else's pr branch, maybe I don't have the permissions, I've done a quick fix on my branch tracking master with this fix in it https://github.com/pillowtrucker/nixpkgs/tree/fix-ca-dervs |
This permits usage of content‐addressed derivations and has the added benefit of checking normalised paths.
7ffe181 to
931f464
Compare
|
thanks |
|
Is it acceptable to check the path with |
|
@robeth @infinisil @hsjobeki unless there are issues with the style, could someone please OK this? I've built several generations of a full desktop system with this and it seems fine. |
hsjobeki
left a comment
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.
Is it acceptable to check the path with
hasStorePathPrefix, which involves converting the option value to a path, or should I try to find an alternative solution that only operates on strings?
Hm, this could be a small regression. Using discardStringContext now would discard the context if it's a store-path. Which then means you can no longer nix-build it.
Where this was possible before. I'd like to keep isString unless some concrete example can be shown why we need to discard the context.
The context is only discarded for the purpose of checking. The option value retains any context. |
Ah yeah, my mistake right. 👍 |
This permits usage of content‐addressed derivations and has the added benefit of checking normalised paths.
We could as an alternative introduce a function to check if a string is a store path prefix that works directly on strings, without producing a temporary path.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.