Repository navigation
fix(catalog): write plugin.yaml as block YAML so Desktop reads its name - #60
Merged
Merged
Conversation
Hermes Desktop reads a package's name from a `name:` line at the start of a line. The JSON manifest had none, so a catalog install put the desktop half in desktop-plugins/catalog instead of under the package name, and every package built this way collided there. The build now writes block YAML and refuses a manifest whose name Desktop would not read. Same fix as Adolanium/hermes-office#2.
7 of 8 tasks
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.
Hermes Desktop reads a package's name from a
name:line at the start of a line inplugin.yaml(detectPluginComponentsinapps/desktop/electron/desktop-plugin-install.ts).scripts/build_catalog.pywrotecatalog/plugin.yamlas JSON, which has no such line. A Desktop catalog install therefore fell back to the folder name and put the desktop half indesktop-plugins/catalog. The agent side parses the YAML and uses the package name, so the two halves disagreed. Every plugin packaged this way also collided in the samedesktop-plugins/catalogfolder, so installing a second one failed withDesktop plugin 'catalog' already exists. Adolanium/hermes-office#1 reported it, and Adolanium/hermes-office#2 fixed it there.The build now writes block YAML with JSON scalars (
name: "..."), still without a YAML library. It also refuses to write a manifest whose name Desktop wouldn't read, so the existingbuild_catalog.py --checkCI step guards this. The manifest's fields and values are unchanged.Tests:
build_catalog.py --check, the catalog policy tests (where the repo has them),py_compileandnode --checkpass.hermes plugins validatepasses on the regeneratedcatalog/tree.plugin.jsis unchanged, so I didn't rerun the feature test suites. I didn't run a catalog install in Hermes Desktop.