bnd
bnd copied to clipboard
Nice manifest writer
Closes #6321
Felix Bundle plugin has a niceManifest option that formats Manifest
Output a nicely formatted manifest that still respects the 72 character line limit.
We adapted this and use it as the new default.
hmm. I'd like to suggest to do it differently.
In Analyzer::calcManifest we have the data in Parameters. Why not add an append method that takes a nice option? This will create an attribute in the manifest with newlines. Which is as far as I know allowed ... (might have to check this).
ManifestUtil::write then needs to account for newlines in the attribute value. it should then reset the limit and output an EOL. it should not put the newline itself in the manifest output.
The advantage is that:
- having a formatted output in Parameters is useful in other contexts.
- The change to ManifestUtil is
- much smaller,
- is arguably wrong by not handling newlines today
- does not require semantic knowledge about the headers, knowledge that Analyzer is the owner of
Why not add an append method that takes a nice option? This will create an attribute in the manifest with newlines. Which is as far as I know allowed ... (might have to check this).
Ok, then let's close this PR and discuss it in the next call maybe. Sounds very core so I am a bit hesitant to take this over.