Skip to content

fix(scribe): reorder ts_parse secs binding for non-Unix builds - #236

Open
ohhhHwH wants to merge 1 commit into
syswonder:devfrom
ohhhHwH:dev-fix
Open

fix(scribe): reorder ts_parse secs binding for non-Unix builds#236
ohhhHwH wants to merge 1 commit into
syswonder:devfrom
ohhhHwH:dev-fix

Conversation

@ohhhHwH

@ohhhHwH ohhhHwH commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Fixes #233: ts_parse in system/scribe/src/lib.rs fails to compile on non-Unix targets with error[E0425]: cannot find value 'secs' in this scope.

Root cause

The secs binding is split across two #[cfg] blocks — #[cfg(unix)] before the use site and #[cfg(not(unix))] after it. On non-Unix targets the first block is stripped by cfg, leaving only the second binding, which is declared after the let ts_ns = secs... line that uses it. Rust only allows a binding to be used after its declaration, hence E0425.

Fix

Move the let ts_ns = ... line below the #[cfg(not(unix))] block so secs is declared before use on both targets. Pure reorder, no logic change.

Validation

  • cargo check -p robonix-scribe — clean (Unix)
  • cargo fmt -p robonix-scribe -- --check — clean

@github-actions github-actions Bot added comp:scribe system/scribe type:bug Bug fix (fix:) labels Aug 27, 2026
@ohhhHwH
ohhhHwH requested a lite review from Copilot September 2, 2026 06:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is a minimal, verified-safe reorder that resolves a concrete non-Unix compile failure without altering runtime logic.

Pull request overview

Fixes a cross-platform compilation error in robonix-scribe by ensuring the secs binding in ts_parse() is declared before it’s used on non-Unix targets, while preserving existing logic.

Changes:

  • Reordered the ts_ns computation to occur after the #[cfg(not(unix))] secs binding.
  • Keeps Unix and non-Unix behavior identical, addressing error[E0425]: cannot find value 'secs' in this scope on non-Unix builds.
File summaries
File Description
system/scribe/src/lib.rs Reorders ts_parse() local bindings so secs is always defined before ts_ns on all targets.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:scribe system/scribe type:bug Bug fix (fix:)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] scribe: "ts_parse" fails to compile on non-Unix targets (use of "secs" before its definition)

2 participants