Skip to content
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

Preserve file context across readFile, second take #1643

Merged
merged 2 commits into from Jan 10, 2022

Conversation

abbradar
Copy link
Member

This rebases old patches to fix #833 and fixes Hydra test failure too. Closes #833.

cc @shlevy

@shlevy
Copy link
Member

shlevy commented Oct 30, 2017

LGTM. I'll set up a hydra jobset

@shlevy
Copy link
Member

shlevy commented Oct 30, 2017

@domenkozar
Copy link
Member

Could we have a test? :)

@abbradar
Copy link
Member Author

@domenkozar Sorry for taking a long time, I've added a test!

@abbradar
Copy link
Member Author

I've rebased the patches but for some reason nix-copy-closure test fails. Any ideas why? I'd very much like to see this fixed in Nix 2.0.

@shlevy
Copy link
Member

shlevy commented Feb 19, 2018

@abbradar That's a bug in the test that I thought @edolstra had fixed... @edolstra should that block merging this?

@edolstra
Copy link
Member

@abbradar You need the nix-2.0 branch of Nixpkgs.

Don't know if changing the behaviour of readFile just before release is a good idea though.

@abbradar
Copy link
Member Author

abbradar commented Feb 19, 2018

@edolstra I see this as a bug because it can silently break users' systems after nix-collect-garbage if they have fancy enough configuration (example). If I understand correctly this fix (in theory) just adds more paths into closure of some outputs so it should be fairly harmless. However I don't feel qualified to say this after I have already broken things with an older fix ;)

@shlevy
Copy link
Member

shlevy commented Feb 19, 2018

@edolstra I'd really prefer we branch off 2.0 if we're going to start delaying PRs because they shouldn't be in 2.0... That way we can keep moving despite being feature frozen (or perhaps feature chilled)

@abbradar
Copy link
Member Author

Can we proceed with this now that 2.0 release has been branched?

@shlevy
Copy link
Member

shlevy commented Feb 26, 2018

@edolstra Any concerns?

@abbradar
Copy link
Member Author

abbradar commented Jun 1, 2019

So, any movement here? I've run into this bug yet again, it's pretty annoying.

@stale
Copy link

stale bot commented Feb 12, 2021

I marked this as stale due to inactivity. → More info

Co-authored-by: Shea Levy <shea@shealevy.com>
@abbradar
Copy link
Member Author

abbradar commented Jan 9, 2022

I have rebased this and resolved conflicts. Not sure if using printStorePathSet here is a good idea.

I understand that life and other priorities can get in the way, but it still feels frustrating to keep rebasing this patchset for so many years without any movement. Maybe now that 2.0 is released long time ago we can move forward with this?

@edolstra
Copy link
Member

The risk with this PR is that it can cause evaluation to produce a different result depending on whether the input is in the Nix store (where it could have references). In the past we had issues like that with Hydra (which copies sources to the Nix store). However, it should be okay so long as the source tree has no references.

@abbradar
Copy link
Member Author

Thanks! Let's hope this won't break corner cases for people like it did before @shlevy helped fix it. If anything arises, ping me.

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.

builtins.readFile should preserve path context
5 participants