Skip to content

Arc/Mutex refactors - #15952

Open
sftse wants to merge 5 commits into
tauri-apps:devfrom
sftse:cc-dev
Open

Arc/Mutex refactors#15952
sftse wants to merge 5 commits into
tauri-apps:devfrom
sftse:cc-dev

Conversation

@sftse

@sftse sftse commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Some low-hanging refactors, removes one Mutex and one Arc.

@sftse
sftse requested a review from a team as a code owner August 31, 2026 14:12
@sftse sftse changed the title Cc dev Arc/Mutex refactors Aug 31, 2026
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through fae76b3

There are 14 changes which include tauri with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-build with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-bundler with minor, tauri-macos-sign with minor, @tauri-apps/api with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor, tauri-driver with minor

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.11.1 2.12.0
tauri-utils 2.9.3 2.10.0
tauri-macos-sign 2.3.4 2.4.0
tauri-bundler 2.9.4 2.10.0
tauri-runtime 2.11.3 2.12.0
tauri-runtime-wry 2.11.4 2.12.0
tauri-codegen 2.6.3 2.7.0
tauri-macros 2.6.3 2.7.0
tauri-plugin 2.6.3 2.7.0
tauri-build 2.6.3 2.7.0
tauri 2.11.5 2.12.0
@tauri-apps/cli 2.11.4 2.12.0
tauri-cli 2.11.4 2.12.0
tauri-driver 2.0.6 2.1.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

Comment thread crates/tauri/src/ipc/channel.rs Outdated
Comment thread crates/tauri/src/menu/plugin.rs Outdated
Comment thread crates/tauri/build.rs
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());

let checked_features_out_path = out_dir.join("checked_features");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we can add a bit of context here that we're at it, this is used for the unit test in tauri to check we're not checking non-existing features with has_feature

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I didn't get what that code was doing anyway? It looks like the code is anticipating multiple features here, which is where the fn has_feature function would make sense, but it's only called a single time with has_feature("custom-protocol").

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cleaned it up.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I didn't get what that code was doing anyway?

this is used for the unit test in tauri to check we're not checking non-existing features with has_feature

I think we might still want to keep this function in case we do something with it in the future

Comment thread crates/tauri/src/menu/plugin.rs Outdated
Comment thread crates/tauri/src/ipc/channel.rs Outdated
Comment on lines 561 to 570
#[inline(always)]
pub fn state(&self) -> Arc<StateManager> {
self.state.clone()
self.webview.manager.state.clone()
}

/// A reference to the state manager associated with application.
#[inline(always)]
pub fn state_ref(&self) -> &StateManager {
&self.state
&self.webview.manager.state
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Candidates to make private in v3, think they are pub by accident.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed, we could put in a todo comment + a deprecation warning, people should use https://docs.rs/tauri/latest/tauri/trait.Manager.html#method.state instead

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