Conversation
Vectorise the new reference raster in `logos/` with potrace 1.16 (the route the other WoofWare packages took) into a light/dark pair whose only difference is the `fill` attribute, display them in the README via `<picture>`, and pack a 1024x1024 PNG rendering as the `PackageIcon` of both `WoofWare.Myriad.Plugins` and `WoofWare.Myriad.Plugins.Attributes`, which shared the old one. The readme previously showed the logo as a plain Markdown image with a relative path. nuget.org does not resolve relative image paths, so that rendered there as a broken image; and it cannot show a `<picture>` element either, because it renders the packed readme through Markdig configured with `DisableHtml()`, which removes the HTML block parser rather than sanitising - raw HTML falls through to a paragraph and is escaped, so the element would appear as literal tags. So each project's `pack` writes a copy of the readme with that element removed into its intermediate output directory and packs that, leaving `PackageIcon` to carry the logo on nuget.org. The strip runs as a `RoslynCodeTaskFactory` inline task rather than through `WriteLinesToFile`, because that task takes items and MSBuild normalises directory separators in an item spec, which silently rewrote a backslash in a sibling repo's readme. It checks its own postcondition (no `<picture>` survived) and fails the pack if the strip did not take, which also makes it safe for the element to grow attributes. The logo moves out of the `WoofWare.Myriad.Plugins` directory, so both `version.json` path filters have to follow it: the Attributes one named `:/WoofWare.Myriad.Plugins/logo.png` explicitly, and the Plugins one covered it implicitly through `./`. Without the new `:/logos/light.png` entries, a future logo change would no longer bump either version height. Verified: both nupkgs differ from the ones `main` produces only in `logo.png` becoming `light.png`, both declare `<icon>light.png</icon>`, and each packed readme is exactly the readme minus its `<picture>` element. Rendering that readme through the same Markdig pipeline leaves no escaped tags outside code blocks, and the destination path resolves correctly both by default and under `UseArtifactsOutput`. The postcondition check was mutation-tested against real packs, per project: each fails an unclosed element and a strip pattern that has lost its attribute tolerance, while the other project still packs, and both strip `<picture class="logo">` correctly. Full suite passes (1272 tests).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vectorises the new reference raster in
logos/with potrace 1.16 (the route the other WoofWare packages took) into a light/dark pair whose only difference is thefillattribute, displays them in the README via<picture>, and packs a 1024x1024 PNG rendering as thePackageIconof bothWoofWare.Myriad.PluginsandWoofWare.Myriad.Plugins.Attributes, which shared the old one.The readme
The logo was previously a plain Markdown image with a relative path. nuget.org does not resolve relative image paths, so it rendered there as a broken image. It cannot show a
<picture>element either: it renders the packed readme through Markdig configured withDisableHtml(), which removes the HTML block parser rather than sanitising, so raw HTML falls through to a paragraph and is escaped — the element would appear as literal tags. So each project'spackwrites a copy of the readme with that element removed into its intermediate output directory and packs that, leavingPackageIconto carry the logo on nuget.org. This is the same mechanism as the other WoofWare packages.The strip runs as a
RoslynCodeTaskFactoryinline task rather than throughWriteLinesToFile, because that task takes items and MSBuild normalises directory separators in an item spec — which silently rewrote a backslash in a sibling repo's readme. It checks its own postcondition (that no<picture>survived) and fails the pack if the strip did not take, which also makes it safe for the element to grow attributes.version.json
The logo moves out of the
WoofWare.Myriad.Pluginsdirectory, so bothversion.jsonpath filters have to follow it — the Attributes one named:/WoofWare.Myriad.Plugins/logo.pngexplicitly, and the Plugins one covered it implicitly through./. Without the new:/logos/light.pngentries, a future logo change would no longer bump either version height.Verification
mainproduces only inlogo.pngbecominglight.png; both declare<icon>light.png</icon>.<picture>element, and rendering it through the same Markdig pipeline nuget.org uses leaves no escaped tags outside code blocks.obj/) and underUseArtifactsOutput(artifacts/obj/).<picture class="logo">correctly.Unrelated observation, not addressed here
<None Include="$(OutputPath)\*.dll" ... />inWoofWare.Myriad.Plugins.fsprojis a wildcard evaluated at project-evaluation time, before the build populatesbin/. Packing a clean checkout therefore produces a package with onlyWoofWare.Myriad.Plugins.dllunderlib/net6.0/, while packing a warm tree produces all ten DLLs. I measured this onmainas well as on this branch, so it is pre-existing and unchanged by this PR — but it does mean the package contents depend on the state of the build directory. Happy to fix separately if you want.