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

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

Closed
13 of 14 tasks
amrbashir opened this issue Sep 5, 2023 · 8 comments
Closed
13 of 14 tasks

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

amrbashir opened this issue Sep 5, 2023 · 8 comments
Labels
scope: api.js The @tauri-apps/api npm package scope: bundler The bundler used in our cli to make installers scope: cli.js The @tauri-apps/cli npm package scope: cli.rs The tauri-cli rust crate scope: core Core packages of Tauri type: breaking change This issue or pull request will introduce a breaking change and requires major version bump type: rfc

Comments

@amrbashir
Copy link
Member

amrbashir commented Sep 5, 2023

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

@amrbashir amrbashir added good first issue Good for newcomers scope: api.js The @tauri-apps/api npm package scope: cli.js The @tauri-apps/cli npm package scope: cli.rs The tauri-cli rust crate scope: core Core packages of Tauri scope: bundler The bundler used in our cli to make installers type: rfc type: breaking change This issue or pull request will introduce a breaking change and requires major version bump labels Sep 5, 2023
@lucasfernog
Copy link
Member

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.

@FabianLars
Copy link
Member

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)

  • Merge bundle.updater into plugins.updater

@amrbashir
Copy link
Member Author

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
Copy link
Member

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 added a commit that referenced this issue Sep 21, 2023
amrbashir added a commit that referenced this issue Sep 21, 2023
amrbashir added a commit that referenced this issue Sep 21, 2023
amrbashir added a commit that referenced this issue Sep 21, 2023
* refactor!: remove `tauri::api` module

ref: #7756

* change file

* fix builds
amrbashir added a commit that referenced this issue Sep 21, 2023
amrbashir added a commit that referenced this issue Oct 2, 2023
…IconBuilder/TrayIcon::on_tray_icon_event`

ref: #7756
@amrbashir
Copy link
Member Author

amrbashir commented Oct 9, 2023

  • 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 amrbashir removed the good first issue Good for newcomers label Oct 16, 2023
@amrbashir
Copy link
Member Author

amrbashir commented Oct 17, 2023

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 #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 added a commit that referenced this issue Oct 17, 2023
* refactor: remove uuid and rand dependencies where applicable

ref: #7756

* replace rand with getrandom

* change files

* InnerListeners private

* revert listeners_object_name [skip ci]

* default for next_event_id

* remove raw listen function

* fix event system

* Apply suggestions from code review [skip ci]

* update names [skip ci]

---------

Co-authored-by: Lucas Nogueira <[email protected]>
Co-authored-by: Lucas Fernandes Nogueira <[email protected]>
@amrbashir
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: api.js The @tauri-apps/api npm package scope: bundler The bundler used in our cli to make installers scope: cli.js The @tauri-apps/cli npm package scope: cli.rs The tauri-cli rust crate scope: core Core packages of Tauri type: breaking change This issue or pull request will introduce a breaking change and requires major version bump type: rfc
Projects
Status: Done
Development

No branches or pull requests

4 participants