Skip to content

Inline normalize_lexically to support stable Rust - #382

Merged
aspizu merged 1 commit into
mainfrom
apz/stable-rust
Sep 29, 2026
Merged

aspizu merged 1 commit into
mainfrom
apz/stable-rust

Conversation

@aspizu

@aspizu aspizu commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Why

The normalize_lexically path method is nightly-only. The current nightly version also returns Result and errors on leading .., which made %include ../foo.gs from a root file panic via unwrap, and goboscript build ../project/main.gs panic on startup.

What changed

  • Inlined the pre-rework normalization semantics as a free function in src/misc.rs: skip ., resolve .. against the previous component, keep leading .. in relative paths, drop .. at an absolute root, return `." when nothing remains.
  • Removed the #![feature(normalize_lexically)] gate, so the crate builds on stable.
  • CI, install docs, contributing docs and the nix flake now use stable.
  • Nightly is still needed only for cargo fmt (nightly rustfmt options).

Behavior notes

  • Leading .. includes no longer panic; they resolve as written.
  • %include ./foo and %include foo now produce the same dedupe key, so the same file can no longer be included twice. Include.path serialized to wasm/LSP clients changes from ./foo.gs to foo.gs for relative invocations.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T15:40:12.511883Z e2de3c8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@aspizu
aspizu merged commit 3dbd02e into main Sep 29, 2026
1 check passed
@aspizu
aspizu deleted the apz/stable-rust branch September 29, 2026 16:15
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.

1 participant