Skip to content

Fix platform-specific standalone build warnings - #889

Merged
nedtwigg merged 1 commit into
mainfrom
build-warning
Oct 2, 2026
Merged

nedtwigg merged 1 commit into
mainfrom
build-warning

Conversation

@nedtwigg

@nedtwigg nedtwigg commented Oct 2, 2026

Copy link
Copy Markdown
Member

Windows standalone builds reported an unused directory binding and an unused restart helper. Mark the Unix-only directory binding as intentionally unused elsewhere and compile QuitMachine::forget_restart only on macOS or in tests, also removing Linux's unused-method warning. Preserve directory permission checks, Unix syncing, and restart tests, and clarify the standalone spec's macOS termination rule.

Validation:

  • Windows: pnpm exec cargo check --release --lib --locked --offline completed without warnings.
  • pnpm exec cargo test --lib --locked --offline: 121 tests passed; existing test-only warnings remain.
  • node scripts/spec-lint.mjs and git diff --check passed.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7ca5bcd
Status: ✅  Deploy successful!
Preview URL: https://96bff5ac.mouseterm.pages.dev
Branch Preview URL: https://build-warning.mouseterm.pages.dev

View logs

restrict: impl Fn(&Path, u32) -> Result<(), String>,
) -> Result<(), String> {
let dir = ensure_parent_with(path, &restrict)?;
let _dir = ensure_parent_with(path, &restrict)?;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Optional: _dir reads as unused, but it's still used on unix at the dir fsync below. Scoping the allow to non-unix keeps the name honest:

Suggested change
let _dir = ensure_parent_with(path, &restrict)?;
#[cfg_attr(not(unix), allow(unused_variables))]
let dir = ensure_parent_with(path, &restrict)?;

(and File::open(dir) at the fsync)

@nedtwigg
nedtwigg merged commit 7168019 into main Oct 2, 2026
12 checks passed

This branch is waiting to be deployed

1 waiting deployment
hosted-preview — 7ca5bcdc Waiting Oct 2, 2026 by nedtwigg via cleanup #665
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