Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): allow extending the shell scope, closes #5910 #7165

Open
wants to merge 3 commits into
base: 1.x
Choose a base branch
from

Conversation

lucasfernog
Copy link
Member

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

@lucasfernog lucasfernog requested a review from a team June 8, 2023 12:24
@lucasfernog lucasfernog requested a review from a team as a code owner June 8, 2023 12:24
@wusyong wusyong added the security: needs audit This issue/PR needs a security audit label Jun 8, 2023
Comment on lines -74 to -80
pub command: std::path::PathBuf,
command: PathBuf,

/// The arguments the command is allowed to be called with.
pub args: Option<Vec<ScopeAllowedArg>>,
args: Option<Vec<ScopeAllowedArg>>,

/// If this command is a sidecar command.
pub sidecar: bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a breaking change, any reason to hide these?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This struct was only used on codegen, no public API returned or takes it as input. I've hidden this so no one use it instead of the builder, which is the stable API.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still shows in documentation https://docs.rs/tauri/latest/tauri/scope/struct.ShellScopeAllowedCommand.html so even if no functions take it as input, we can't break it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And if it is not meant to be used by users anyway, it won't hurt to keep the fields public anyways and maybe add a TODO to hide the type from docs and make the fields private

@FabianLars
Copy link
Member

I assume this won't be merged into v1 anymore, right? Should we close it then and queue it for v2 migration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security: needs audit This issue/PR needs a security audit
Projects
Status: 📬Proposal
Development

Successfully merging this pull request may close these issues.

None yet

5 participants