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

Make imports from unrealised derivations work well with queries #22

Closed
wants to merge 18 commits into from

Conversation

shlevy
Copy link
Member

@shlevy shlevy commented May 16, 2012

I'm opening this pull request now to have a place for a dialog as I work on this. I'll let you know when it's done and ready to pull.

shlevy added 16 commits May 15, 2012 23:00
…ilable due to read-only mode

I'm not sure if the exclamation point is valid in the xmlOutput case, this may
change in a later commit
…hose name cannot be evaluated in readonly mode should keep the VersionDiff unchanged
@shlevy
Copy link
Member Author

shlevy commented Jun 7, 2012

Ok @edolstra , I think this is ready for review. nix-env -q should now be more versatile in the import from unrealised derivation case. Future work includes adding a flag to allow nix-env -q to realise such derivations, and possibly some sort of max-depth feature for queries (though I think that issue will be better addressed when we have a real broken case in front of us).

@shlevy
Copy link
Member Author

shlevy commented Jun 22, 2012

@edolstra ping?

columns.push_back(i->name);
else
if (xmlOutput)
attrs["name"] = "!name-unknown-in-readonly-mode!";
Copy link
Member

Choose a reason for hiding this comment

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

Isn't it better to just omit unknown attributes rather than emit a value like "!name-unknown-..."? Especially in the XML output case, omitting an attribute shouldn't cause any problems. In the text output case, it might cause problems if the output is processed by a script like "awk { print $3 }". But in that case I would prefer a shorter string like "?".

Copy link
Member Author

Choose a reason for hiding this comment

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

Alright, I'll just omit the fields in every case unless you know of a specific case where the field needs to be output.

@shlevy
Copy link
Member Author

shlevy commented Aug 29, 2012

Whatever happens with #31, this definitely isn't the way we want to go.

@shlevy shlevy closed this Aug 29, 2012
@shlevy shlevy deleted the dynamic-import-queries branch March 10, 2014 10:54
edolstra added a commit that referenced this pull request Apr 25, 2017
Print syntactially invalid attribute names as strings.
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.

None yet

2 participants