Skip to content

Remove AsRef<Window> on WebviewWindow - #14026

Merged
Legend-Master merged 1 commit into
tauri-apps:devfrom
Legend-Master:remove-asref-window
Aug 18, 2025
Merged

Remove AsRef<Window> on WebviewWindow#14026
Legend-Master merged 1 commit into
tauri-apps:devfrom
Legend-Master:remove-asref-window

Conversation

@Legend-Master

@Legend-Master Legend-Master commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

This reverts the AsRef<Window> impl for WebviewWindow made in #14012

cc @WSH032, after some discussion with the team, we think we should avoid this type of breaking changes in minors

And we can instead, add explicit methods like as_window, as_webview

@Legend-Master
Legend-Master requested a review from a team as a code owner August 18, 2025 05:40
@github-actions

Copy link
Copy Markdown
Contributor

Package Changes Through b625a55

There are 10 changes which include tauri with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-utils with minor, tauri-bundler with minor, tauri-macos-sign with minor, tauri-runtime-wry with minor, tauri-runtime with minor, @tauri-apps/api with minor, tauri-plugin 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.7.0 2.8.0
tauri-utils 2.6.0 2.7.0
tauri-macos-sign 2.1.0 2.2.0
tauri-bundler 2.5.2 2.6.0
tauri-runtime 2.7.1 2.8.0
tauri-runtime-wry 2.7.2 2.8.0
tauri-codegen 2.3.1 2.3.2
tauri-macros 2.3.2 2.3.3
tauri-plugin 2.3.1 2.4.0
tauri-build 2.3.1 2.3.2
tauri 2.7.0 2.8.0
@tauri-apps/cli 2.7.1 2.8.0
tauri-cli 2.7.1 2.8.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

@Legend-Master
Legend-Master merged commit 3806568 into tauri-apps:dev Aug 18, 2025
19 of 20 checks passed
@Legend-Master
Legend-Master deleted the remove-asref-window branch August 18, 2025 05:45
@WSH032

WSH032 commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

It's fine.

I just looked up some resources and found that whether this is considered a breaking change is somewhat controversial: https://std-dev-guide.rust-lang.org/breaking-changes/new-trait-impls.html#inference-breaks-when-a-second-generic-impl-is-introduced.

Personally, I wouldn't consider it a breaking change; otherwise, AsRef would be no different from Deref (both could only have one implementation).

But since it does break plugins before 2.8, reverting it is reasonable. This isn't very elegant—it's really unfortunate for Rust 😂

@Legend-Master

Copy link
Copy Markdown
Contributor Author

Yeah, that's the problem, it is not a problem by itself but the way we have a single AsRef impl to begin with makes it a breaking change and the fact that it does affect the plugins usages right now

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.

3 participants