Skip to content

Commit fbd86f5

Browse files
joshwilhelmiclaude
andcommitted
[gobby-cli-#124] fix(ghook): Mark Windows extern block unsafe; release 0.1.1
ghook 0.1.0 published to crates.io but the Windows build target failed: edition 2024 requires `extern "system" { ... }` to be `unsafe extern "system" { ... }`. Local Mac dev never exercised the #[cfg(windows)] branch in detach.rs so it slipped through. Fix is one line in crates/ghook/src/detach.rs:36 plus a Cargo.toml bump to 0.1.1 and a CHANGELOG entry. Linux/Mac use the #[cfg(unix)] setsid(2) branch and were never affected -- the crates.io 0.1.0 install works on those platforms but not Windows. Verified: cargo build/test/clippy clean (27 ghook tests passing). Once gobby-hooks-v0.1.1 is tagged, the Release ghook workflow should succeed across all 5 build targets and create the GitHub Release that 0.1.0 missed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e6037e6 commit fbd86f5

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3636
- **Low-savings marker** — Suppress `[gsqz:low-savings]` marker when prepending it would grow the output beyond the original. The marker now only annotates when the annotation itself doesn't make things worse. (#111)
3737
- **Outer compression header for `/no-op` strategy** — When the low-savings marker is suppressed (above), the resulting `{pipeline}/no-op` strategy now also skips the outer `[Output compressed by gsqz — …, 0% reduction]` header and the daemon savings report. The user sees the original output verbatim. `CompressionResult::is_passthrough()` classifies `passthrough`, `excluded`, and `*/no-op` together so both call sites stay in sync. (#121)
3838

39+
## [0.1.1] — gobby-hooks
40+
41+
### Fixed
42+
43+
#### gobby-hooks
44+
45+
- **Windows build**`crates/ghook/src/detach.rs` declared `extern "system" { fn FreeConsole() -> i32; }` for the Windows-only `FreeConsole()` call. Edition 2024 requires extern blocks to be marked `unsafe`, so the Windows build target failed under Rust 1.95. Mac/Linux unaffected (their `#[cfg(unix)]` path uses `setsid(2)` instead). 0.1.0 published to crates.io but Windows users could not `cargo install gobby-hooks`. (#124)
46+
3947
## [0.1.0] — gobby-hooks
4048

4149
### Added

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ghook/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gobby-hooks"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2024"
55
rust-version = "1.85"
66
authors = ["Josh Wilhelmi <hello@gobby.ai>"]

crates/ghook/src/detach.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ pub fn detach() {
3333
#[cfg(windows)]
3434
{
3535
// SAFETY: FreeConsole is safe to call even with no attached console.
36-
extern "system" {
36+
// Edition 2024 requires extern blocks to be marked unsafe.
37+
unsafe extern "system" {
3738
fn FreeConsole() -> i32;
3839
}
3940
unsafe {

0 commit comments

Comments
 (0)