-
Notifications
You must be signed in to change notification settings - Fork 46
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
elfshaker list
output changes proposal
#74
Comments
elfshaker list
output changes proposal
Agreed on all points expect the machine readability by default. I think useful output by default is better for new (all?) users. When machine readability is desired it could be specified by (e.g.)
|
My day went differently than I imagined so I didn't get much time to hack on this today, sorry. One issue I'd not considered much yet was what to do if a snapshot and a pack are ambiguous, if Machine readability: For me the question of machine readability is "How much value does breaking machine readability by default bring?". If the extra human readable information is vital then maybe it's worth it. In my mind at the moment that's not the case though, the extra information is 'how big is the snapshot' and 'how many files does the snapshot have', which aren't particularly actionable information, and are available through other obvious routes (e.g. extract the snapshot, run Headers on stderr: my experience of this so far is just that it's weird. As an experienced unix user I haven't seen this behaviour in other apps, so I fear it is too surprising. And yeah, I think the value brought by the header is low so it's probably best omitted. Unique snapshots: my concern there was what to do for the output of |
I like the Machine readability: "How much value does breaking machine readability by default bring?" We seem to have entirely different perspectives on this. Whichever way we end up implementing this, it's not going to make people not want to use elfshaker. I'd optimise for OOTB interactive usage. But having to extract a snapshot to compute size is not straightforward: the directory contents will have to be replaced by the new snapshot, also Headers on stderr: Ack Unique snapshots: I think the output should always be fully-qualified because of the issues with sorting that could arise otherwise. |
After more than 2 months, I have some more thoughts :) Unique snapshots: I like the idea of outputting the simple, unqualified snapshots and I understand the role disambiguating between snapshots could play in simplifying the output. But, I just realised that even if we can disambiguate between |
Yes, my thinking was that if they are not identical, it could print fully qualified. Perhaps it is too weird to have something which looks like it only prints snapshot names but then suddenly prints On the other hand, I'm assuming time proximity between reading the output and reusing the input, and ignoring the fact that things could change in the meantime to make them ambiguous. This seems reasonable since I expect ambiguities arriving by name to be rare according to 'sensible intended use'. One option in my mind is to document that the output of elfshaker-list is a |
Given
What would the list output be according to your suggestion?
Wouldn't that be confusing if expecting to see consecutive snapshots? |
Yes, it could be confusing to someone. Would it matter in practice, so long as users are anyway feeding the input into elfshaker commands which don't mind being fully qualified? I'm not sure if we can promise consecutive snapshots efficiently, also. It would be good if we can avoid the need to sort, which could get expensive with sufficient snapshots. Maybe we have to sort because the alternative would be too confusing. I'd like to try without and see how bad it is. Also, if we can identify identical snapshots, we don't need to print |
elfshaker find prints all snapshots without sorting and the output can be fed back into elfshaker. We do that in manyclangs-run to match commit SHA to snapshot. I prefer optimising elfshaker list for ease of use and readability. In any case, we can try both approaches and see which we like more. It should be 1 line change anyway. |
elfshaker list has been split into several commands. - elfshaker list <pack>... lists the snapshots in the packs - elfshaker list-files <snapshot> lists the files in the snapshot - elfshaker list-packs lists the packs in the repo See #74 and the help output.
elfshaker list has been split into several commands. - elfshaker list <pack>... lists the snapshots in the packs - elfshaker list-files <snapshot> lists the files in the snapshot - elfshaker list-packs lists the packs in the repo See #74 and the help output.
elfshaker list has been split into several commands. - elfshaker list <pack>... lists the snapshots in the packs - elfshaker list-files <snapshot> lists the files in the snapshot - elfshaker list-packs lists the packs in the repo See #74 and the help output.
elfshaker list has been split into several commands. - elfshaker list <pack>... lists the snapshots in the packs - elfshaker list-files <snapshot> lists the files in the snapshot - elfshaker list-packs lists the packs in the repo See #74 and the help output.
elfshaker list has been split into several commands. - elfshaker list <pack>... lists the snapshots in the packs - elfshaker list-files <snapshot> lists the files in the snapshot - elfshaker list-packs lists the packs in the repo See #74 and the help output.
elfshaker list has been split into several commands. - elfshaker list <pack>... lists the snapshots in the packs - elfshaker list-files <snapshot> lists the files in the snapshot - elfshaker list-packs lists the packs in the repo See #74 and the help output.
At the moment 'elfshaker list' shows packs by default. This is inconvenient as the output is not something you can feed into 'elfshaker extract' and other tools.
@veselink1 and I discussed this briefly and here are some considerations:
PACK:SNAPSHOT
form.[PACK:]
where possible? Probably not because then we might be back to the 'looks like sorted order problem'. Unless we think it's clear enough to have the snapshot name as the sort key.--format
?elfshaker list
shows all snapshots.elfshaker list <pack>
shows snapshots within a pack.elfshaker list <snapshot>
could show files within a snapshot.--format
considerations./dev/null
. I'm flexible on this point.extract
would be the same. I suspect this is not too expensive to compute/maintain. One possibility is to memoize it as another field to the.pack.idx
file and compute it on demand if the information is required but not present.Another thing to consider is that we're talking about changing the interface here, which could be confusing to users not prepared for it. I don't think it's big deal at this stage in the project, and the failures would be pretty obvious to users in this case, but not something I would do lightly in the future.
The text was updated successfully, but these errors were encountered: