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

fix(core): Initialize command cache when a capability is added #11785

Merged
merged 5 commits into from
Nov 26, 2024

Conversation

lars-berger
Copy link
Contributor

This line of src/ipc/authority.rs panics when a command is run after a capability is added at runtime (via add_capability).

    let cache = self.command_cache.get(key).unwrap();
    ...

add_capability deletes its corresponding command_cache entry here, which then causes the above line to panic.

@lars-berger lars-berger requested a review from a team as a code owner November 24, 2024 17:48
Copy link
Contributor

github-actions bot commented Nov 25, 2024

Package Changes Through eb83553

There are 8 changes which include @tauri-apps/api with minor, tauri-bundler with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.1.1 2.2.0
tauri-utils 2.1.0 2.1.1
tauri-bundler 2.1.0 2.2.0
tauri-runtime 2.2.0 2.3.0
tauri-runtime-wry 2.2.0 2.3.0
tauri-codegen 2.0.3 2.0.4
tauri-macros 2.0.3 2.0.4
tauri-plugin 2.0.3 2.0.4
tauri-build 2.0.3 2.0.4
tauri 2.1.1 2.2.0
@tauri-apps/cli 2.1.0 2.2.0
tauri-cli 2.1.0 2.2.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

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

Thank you

@amrbashir
Copy link
Member

@lars-berger you have a couple of commits that are not verified and I can't merge the PR unless they are signed. you can sign past commit like this. git rebase --exec 'git commit --amend --no-edit -n -S' -i dev

@lars-berger lars-berger force-pushed the fix/capability-command-cache branch from 1707203 to eb83553 Compare November 26, 2024 11:56
@lars-berger
Copy link
Contributor Author

@amrbashir Rebased with signed commits 👍

@amrbashir amrbashir merged commit ba6f370 into tauri-apps:dev Nov 26, 2024
20 checks passed
@lars-berger lars-berger deleted the fix/capability-command-cache branch November 26, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants