Skip to content

Expose event interface. fixes #2733#3321

Merged
lucasfernog merged 4 commits into
tauri-apps:nextfrom
Chaostheorie:next
Feb 4, 2022
Merged

Expose event interface. fixes #2733#3321
lucasfernog merged 4 commits into
tauri-apps:nextfrom
Chaostheorie:next

Conversation

@Chaostheorie

@Chaostheorie Chaostheorie commented Feb 2, 2022

Copy link
Copy Markdown
Contributor

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

@amrbashir amrbashir left a comment

Copy link
Copy Markdown
Member

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

Comment thread core/tauri/src/lib.rs Outdated
Comment thread core/tauri/src/event.rs Outdated

@amrbashir amrbashir left a comment

Copy link
Copy Markdown
Member

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

Comment thread core/tauri/src/app.rs Outdated
Comment thread core/tauri/src/lib.rs
@Chaostheorie Chaostheorie requested a review from a team as a code owner February 2, 2022 15:21
@Chaostheorie

Chaostheorie commented Feb 2, 2022

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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

Chaostheorie commented Feb 2, 2022

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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 👍

Comment thread .changes/api-change-events.md Outdated
@lucasfernog lucasfernog merged commit 15358b1 into tauri-apps:next Feb 4, 2022
@Chaostheorie

Copy link
Copy Markdown
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.

4 participants