feat(plugins): support multiple --plugin-url values and add PluginName newtype#4680
Merged
Conversation
…e newtype (#4675, #4674) --plugin-url now accepts multiple values via ArgAction::Append; --plugin-sha256 is removed in favour of inline url@sha256 syntax. The runner iterates over all provided URLs and passes the full Vec<TempDir> to with_ephemeral_plugins(). PluginName newtype introduced in zeph-plugins: TryFrom<String>/TryFrom<&str> validate on construction via validate_plugin_name(), Deserialize delegates to TryFrom (never bypasses validation), Serialize remains transparent. AddResult, InstalledPlugin, and AutoUpdateResult now carry PluginName instead of String. BREAKING CHANGES: - --plugin-sha256 flag removed; use url@sha256 inline syntax instead - .name on AddResult, InstalledPlugin, AutoUpdateResult is now PluginName; use .name.as_str() or .name.to_string() where &str/String is required
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.
Summary
--plugin-urlnow accepts multiple values viaArgAction::Append;--plugin-sha256removed in favour of inlineurl@sha256syntax per URL. Runner iterates over all URLs and passes the fullVec<TempDir>towith_ephemeral_plugins().PluginNamenewtype introduced inzeph-plugins—TryFrom<String>/TryFrom<&str>validate viavalidate_plugin_name()at construction;Deserializedelegates toTryFrom(never bypasses validation);Serializeis transparent.AddResult,InstalledPlugin, andAutoUpdateResultcarryPluginNameinstead of rawString.Breaking changes
--plugin-sha256CLI flag removed; useurl@sha256inline syntax instead.nameonAddResult,InstalledPlugin,AutoUpdateResultis nowPluginName; use.name.as_str()or.name.to_string()where&str/Stringis requiredTest plan
cargo nextest run --workspace --lib --bins— 10572 passed, 22 skippedcargo +nightly fmt --check— cleancargo clippy --workspace --features desktop,ide,server,chat,pdf,scheduler -- -D warnings— cleanRUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler— cleanparse_plugin_url_arg(multiple@, bare@, empty string)PluginNamedoc-tests cover happy path, empty string, >64 char rejectionDeserializeforPluginNamerejects invalid names; transparentSerializeroundtrips correctlyCloses #4675
Closes #4674