Skip to content

Conversation

@hamishmack
Copy link
Collaborator

Strings with context are the ones in the store that cannot be updated with the script (not the other way around).

Strings with context are the ones in the store that cannot be updated with the script (not the other way around).
@hamishmack hamishmack requested a review from yvan-sraka August 31, 2022 11:03
@hamishmack
Copy link
Collaborator Author

Sanity check:

nix-repl> toString ./.
"/Users/hamish/iohk/haskell.nix"

nix-repl> builtins.hasContext (toString ./.)
false

nix-repl> toString pkgs.nix
"/nix/store/p29gcfammnymrxc372fbn22hhr4jpqk2-nix-2.10.3"

nix-repl> builtins.hasContext (toString pkgs.nix)
true

Copy link
Collaborator

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

Worth a comment, since apparently it's not obvious!

@hamishmack
Copy link
Collaborator Author

I've changed it to not rely on hasContext. I'm not sure if a directory can have a context without starting with builtins.storeDir (and if it does, does that mean the directory is read only), but if it can the old code was broken anyway (since it assumed the regex would match).

@hamishmack hamishmack merged commit de81c31 into master Aug 31, 2022
@iohk-bors iohk-bors bot deleted the hkm/fix-materialization-message branch August 31, 2022 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants