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

Expose event interface. fixes #2733 #3321

Merged
merged 4 commits into from Feb 4, 2022
Merged

Expose event interface. fixes #2733 #3321

merged 4 commits into from Feb 4, 2022

Conversation

Chaostheorie
Copy link
Contributor

@Chaostheorie Chaostheorie commented Feb 2, 2022

Expose tauri::event and rename tauri::event::Event to EmittedEvent. Temporary fix for #2733. This is supposed to be a POC for my internal use until #2733 is resolved in v1.x.

What kind of change does this PR introduce?

  • Bugfix
  • Refactor

Does this PR introduce a breaking change?

  • Yes, and the changes aren't approved
  • No

Note: Tests were passing on GNU/Linux 5.15.18-1-lts with rustc 1.58.0

@Chaostheorie Chaostheorie requested a review from a team February 2, 2022 13:29
Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to fix this.

You need to:

  1. rename EmittedEvent to Event and remove any mention of EmittedEvent
  2. rename Event to RunEvent, obviously this will clash with the runtime::RunEvent import in core/tauri/src/app.rs so you're just gonna need to rename the import and not the original struct, something like this use runtime::RunEvent as RuntimeRunEvent

core/tauri/src/lib.rs Outdated Show resolved Hide resolved
core/tauri/src/event.rs Outdated Show resolved Hide resolved
Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

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

You also need to add a changefil in .changes folder and don't forget to mention the breaking change Event -> RunEvent

core/tauri/src/app.rs Outdated Show resolved Hide resolved
core/tauri/src/lib.rs Show resolved Hide resolved
@Chaostheorie Chaostheorie requested a review from a team as a code owner February 2, 2022 15:21
@Chaostheorie
Copy link
Contributor Author

Chaostheorie commented Feb 2, 2022

What would be the appropriate level for this change? Semver would dictate to use major since the API is changed, but semver doesn't seem to be enforced for next.

@FabianLars
Copy link
Member

It's not enforced because of the prelease stuff, so patch is fine, as this needs to land in v1 anyway (mainly because of the EventHandler fix)

@Chaostheorie Chaostheorie changed the title Expose event interface Expose event interface. fixes #2733 Feb 2, 2022
@Chaostheorie
Copy link
Contributor Author

Chaostheorie commented Feb 2, 2022

There seems to be a change request pending, but I can't figure out, what it is referring to.

@amrbashir your name appears in the UI, have I overlooked something?

@FabianLars
Copy link
Member

@Chaostheorie Don't worry, that's just the UI not updating until he approves the PR. As far as i can see you got everything he requested so far 👍

@lucasfernog lucasfernog merged commit 15358b1 into tauri-apps:next Feb 4, 2022
@Chaostheorie
Copy link
Contributor Author

@amrbashir and @FabianLars thank you for the great help and explanations.

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.

None yet

4 participants