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

Update watchexec to v5 and watchexec-signals to v4 #118

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

myanvoos
Copy link
Contributor

Related to Issue #34

Previously updating watchexec to v5 leads to this error:

error[E0308]: mismatched types
  --> crates/tuono/src/watch.rs:90:46
   |
90 |         if action.signals().any(|sig| sig == Signal::Interrupt) {
   |                                       ---    ^^^^^^^^^^^^^^^^^ expected `watchexec_supervisor::Signal`, found `watchexec_signals::Signal`

This PR fixes the import issue by changing use watchexec-signals::Signal to use watchexec_supervisor::Signal.

It also updates watchexec-signals to v4 with no further errors.

@Valerioageno
Copy link
Member

Thanks for addressing this. On my side, it panics when I try to start the dev environment on any project of the repo.

Screenshot 2024-11-18 at 16 39 49

Copy link
Member

@Valerioageno Valerioageno left a comment

Choose a reason for hiding this comment

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

Could you please check that the fixes work on the repositories example projects and documentation website?

use watchexec_supervisor::job::{start_job, Job};
use watchexec_supervisor::Signal;
Copy link
Member

@Valerioageno Valerioageno Nov 18, 2024

Choose a reason for hiding this comment

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

Why this change? Technically, watchexec_supervisor::Signal is just a re-export from watchexec_signals::Signal

https://docs.rs/watchexec-supervisor/latest/watchexec_supervisor/index.html#reexports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right - what happened was I updated watchexec to 5.0.0 first (while watchexec_signals was still on 3.0.0) and encountered the error mentioned in the PR description. Changing the import to watchexec_supervisor::Signal fixed it. But updating watchexec_signals to 4.0.0 fixes the error as well since watchexec 5.0.0 is dependent on it.

I'll revert the import back to watchexec_signals::Signal in a later commit as it's no longer necessary

@Valerioageno Valerioageno self-requested a review November 19, 2024 13:32
@Valerioageno
Copy link
Member

Thanks @myanvoos for addressing this!

@Valerioageno Valerioageno merged commit b50902d into tuono-labs:main Nov 19, 2024
5 checks passed
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.

2 participants