fix(scribe): reorder ts_parse secs binding for non-Unix builds - #236
Open
ohhhHwH wants to merge 1 commit into
Open
fix(scribe): reorder ts_parse secs binding for non-Unix builds#236ohhhHwH wants to merge 1 commit into
ohhhHwH wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 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_nscomputation to occur after the#[cfg(not(unix))]secsbinding. - Keeps Unix and non-Unix behavior identical, addressing
error[E0425]: cannot find value 'secs' in this scopeon 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #233:
ts_parseinsystem/scribe/src/lib.rsfails to compile on non-Unix targets witherror[E0425]: cannot find value 'secs' in this scope.Root cause
The
secsbinding 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 bycfg, leaving only the second binding, which is declared after thelet 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 sosecsis 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