Skip to content

Conversation

WSH032
Copy link
Contributor

@WSH032 WSH032 commented Aug 11, 2025

The &'static str makes fn init almost useless for FFI scenarios. Therefore, I replaced it with IntoIterator<Item = impl Into<String>>, but this could be a breaking change.

What does the Tauri team think about this? If semantic compatibility prevents this improvement in v2, I am ok with temporarily implementing a new init downstream using a Builder.

@WSH032 WSH032 requested a review from a team as a code owner August 11, 2025 18:53
@FabianLars
Copy link
Member

i think this change is fine. that said, i'd remove the args argument in v3, doesn't make sense to me here and the Builder should be used if args need to be set.

Copy link
Contributor

github-actions bot commented Aug 11, 2025

Package Changes Through b63c58e

There are 10 changes which include autostart with minor, autostart-js with minor, fs with patch, fs-js with patch, nfc with patch, nfc-js with patch, opener with minor, opener-js with minor, store with minor, store-js 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
api-example 2.0.32 2.0.33
api-example-js 2.0.28 2.0.29
autostart 2.5.0 2.6.0
autostart-js 2.5.0 2.6.0
fs 2.4.1 2.4.2
fs-js 2.4.1 2.4.2
dialog 2.3.2 2.3.3
dialog-js 2.3.2 2.3.3
opener 2.4.0 2.5.0
opener-js 2.4.0 2.5.0
http 2.5.1 2.5.2
http-js 2.5.1 2.5.2
nfc 2.3.0 2.3.1
nfc-js 2.3.0 2.3.1
persisted-scope 2.3.1 2.3.2
store 2.3.0 2.4.0
store-js 2.3.0 2.4.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

Co-authored-by: Fabian-Lars <[email protected]>
@Legend-Master
Copy link
Contributor

Legend-Master commented Aug 12, 2025

I would probably prefer keeping this function as is so we don't breaking anything and remove it in v3, the builder was added for the exact reason because this function is not very ergonomic (forces you to pass in args and macos_launcher), I don't even mind we add #[deprecated] to it

If we don't remove it, we probably want to remove all the parameters and making it just an alias to Builder::new().build() (which is a little shorter and if most people don't need to config the builder, it could be used)

@WSH032
Copy link
Contributor Author

WSH032 commented Aug 12, 2025

I agree with @Legend-Master's opinion (There should be one-- and preferably only one --obvious way to do it. --Zen of Python).

Having both fn init()/fn init(macos_launcher) and Builder::new().build() can be confusing, and seeing &'static str in the signature (as a library) is even more confusing 😂.

So, let's close this PR?

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