Open g5t opened 9 months ago
Thanks for the report! Yes, indeed, this could be much more clearly handled.
A few stray thoughts:
One issue is of course, that any fancy code on my side which would make mcpltool produce more informative information, would have to be implemented in C - with all the hassle that entails.
At the very least, it is true that it might be helpful to indicate which key in the header-data is causing the incompatiblity. And perhaps one might also include some sort of blob-checksum value in the mcpltool printouts.
But nonetheless, I will keep in mind this issue when next getting around to an overhaul of MCPL. It might also be that simply linking to a dedicated page on a website would go some way.
For the revamp of --help
: Hmm... maybe. But if I add too many "submenus", then people would complain that info was hidden away in some submenu.
I might add a followup comment to @g5t very nicely long suggestion: Assuming a user now has an idea of which field is blocking the merge, or knew this beforehand - would an --ignore-header-field option make sense? I.e selectively ignore differences in some header field when merging. I have no idea how difficult it would be to program though, so it might be horrible idea.
Sounds like a useful idea @ebknudsen !
Like all things MCPL, it might take some time before I actually do anything. However, I do plan to get back to MCPL development in the near future :-)
An improvement in https://github.com/McStasMcXtrace/McCode/issues/1505 has made me aware that
mcpltool --merge
will, sensibly, refuse to combine files which have different 'header info'.For two such files,
part_0.mcpl.gz
andpart_1.mcpl.gz
, a user seesFollowing the provided advice gives the following 52 lines of help information,
After a careful perusal, an user who is not comfortable using
--forcemerge
without understanding what differs between the headers of their files may decide to inspect each file using--justhead
. The first file header information looks likeAnd the second (elided) is nearly identical.
The user then must realize that the difference likely resides in the
"mccode_cmd_line"
blob, and then refer back tomcpltool -h
output to discover how to access the contained data.Finally, a user sees something like
Possible improvements
More useful error output from
mcpltool --merge
The error message produced by
mcpltool --merge
could be more explicit. If it instead looked likeThat is, it lists
It would go a long way to helping a user understand what is different between their files.
More easily parsed help information
52 lines of help information is too much to display at once. It could be very nice to have separate help information for each sub-command, e.g.,