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

Implement ctrlc in place of signal hook on Windows #1123

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

seriouscatsoserious
Copy link
Contributor

@seriouscatsoserious seriouscatsoserious commented Dec 10, 2024

Satisfies #709, utilizing ctrlc in place of signal hook on Windows only.

@romanz
Copy link
Owner

romanz commented Dec 11, 2024

Many thanks for the contribution!

Copy link
Owner

@romanz romanz left a comment

Choose a reason for hiding this comment

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

Would it please be possible to add a CI job to make sure the new code builds as expected on Windows?

@seriouscatsoserious
Copy link
Contributor Author

Should note that there is no Windows job with --features metrics_process flag because Prometheus doesn't work on Windows and I didn't want to introduce more complexity just for that

Cargo.toml Outdated
tiny_http = { version = "0.12", optional = true }

[target.'cfg(windows)'.dependencies]
ctrlc = "3.2.5"
Copy link
Owner

Choose a reason for hiding this comment

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

Just from curiosity, why not using 3.4.2 ctrlc?
IIUC it should support our MSRV: https://github.com/Detegr/rust-ctrlc/blob/3.4.2/Cargo.toml#L15

@seriouscatsoserious seriouscatsoserious force-pushed the serious-branch branch 3 times, most recently from e7cb794 to 217b475 Compare December 16, 2024 15:24
@seriouscatsoserious
Copy link
Contributor Author

seriouscatsoserious commented Dec 16, 2024

Since this is a binary project, we should use the latest compatible dependency versions.

Updated:

  • Minimum Supported Rust Version (MSRV) to 1.69.0
  • ctrlc to 3.4.5 (latest version)

This follows Rust's MSRV policy where MSRV bumps are not considered breaking changes.
See: rust-lang/api-guidelines#231

@seriouscatsoserious seriouscatsoserious force-pushed the serious-branch branch 4 times, most recently from e7f0abe to 3bede84 Compare December 16, 2024 16:39
rust-toolchain.toml Outdated Show resolved Hide resolved
Copy link
Owner

@romanz romanz left a comment

Choose a reason for hiding this comment

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

Many thanks!

@romanz romanz merged commit 3e4b498 into romanz:master Dec 16, 2024
6 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