tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
84.5k stars 2.54k forks source link

[meta] Breaking changes before v2-beta release #7756

Closed amrbashir closed 1 year ago

amrbashir commented 1 year ago

Public API changes:

Internal changes:

This list is open for discussion, I just made it because I keep forgetting about them and feel free to add more as you see fit.

cc @tauri-apps/wg-tauri

lucasfernog commented 1 year ago

I like most of this, but I'm not sure about Make almost all callbacks (where it makes sense), return a tauri::Result because most of our APIs return tauri::Result and would be easier to use ? operator.. This one makes it harder to use custom Result types.

lorenzolewis commented 1 year ago

I'm not sure if these qualify under "breaking changes", but I'm tracking these in https://github.com/tauri-apps/tauri-docs/issues/1344 :

FabianLars commented 1 year ago

I'd like to request another one, merging the 2 updater configs into one. It may be a bit awkward to have the cli/bundler care about plugin configs but that's still wayyyyy less awkward than having 2 updater configs imo. Also we'll likely need something similar for the shell and deep link plugins anyway (to bundle the additional binaries needed for them if the plugins are used)

amrbashir commented 1 year ago

I like most of this, but I'm not sure about Make almost all callbacks (where it makes sense), return a tauri::Result because most of our APIs return tauri::Result and would be easier to use ? operator.. This one makes it harder to use custom Result types.

My bad, I actually thought we have more than one callback that returns a result, turns out it is only .setup, Should be fine to keep as is then.

lorenzolewis commented 1 year ago

Met @nathan234 at RustConf, Nathan mentioned looking at integrating ART for the Android side of 2.0. Feel free to join the conversation here, open a new issue/PR, or join us on Discord!

amrbashir commented 1 year ago
  • Event and RunEvent, I think RunEvent should be renamed to Event and Event should be changed to EmittedEvent and a variant under Event (which was previously named RunEvent)

While trying to implement this change, I had a change of heart because the JS side uses Event as the type name of the so called EmittedEvent in Rust and that doesn't make sense, so I decided to keep the names as they are for now.

if anyone feels like this change is still needed, let me know

amrbashir commented 1 year ago

Move from TS to JS with JSDoc for @tauri-apps/api npm package, see discord wg-forum post

Decided to keep TS and instead opted into simplifying the output JS files in https://github.com/tauri-apps/tauri/pull/8025 which makes:

  1. The generated files easier to edit and patch locally
  2. Go to definition doesn't work as expected but Go to source definition does
amrbashir commented 1 year ago

Closing this as most items are now implemented, the remaining 2 items could be added later, and will be tracked in their respective issues.