bndtools / bnd

Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
https://bndtools.org
Other
532 stars 305 forks source link

Nice manifest writer #6323

Closed chrisrueger closed 1 month ago

chrisrueger commented 1 month ago

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.

pkriens commented 1 month ago

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:

chrisrueger commented 1 month ago

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.