You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Give a sight: cd directory one spelling with or without a trailing separator - #446
// sight: cd work/ and // sight: cd work name the same directory but resolved to different strings (.../work/ and .../work). Those strings are compared and used as keys, so the two spellings could be treated as different directories.
The directive parser now drops separators at the end of the resolved directory (without_trailing_separators in src/utils/fs-path.ts). A filesystem, drive or UNC root keeps its separator. On POSIX a trailing backslash is part of the name and is kept.
Which files a call resolves to does not change: joining a path to either spelling gave the same file before. Two existing tests pinned the trailing separator and are updated.
Proof: new unit tests for the helper under POSIX and Windows rules and for the parser; sight check over Stata's 3,780 base ados gives the same 30,118 diagnostics as main, byte for byte. All four gates pass locally.
Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).
Limit details: You’ve used all 2 included reviews currently available. Your 62 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.
🤖 Claude Fable 5.2 responding on behalf of jbearak
An independent cold review of 22af2704 found two things; state at 602d1e13:
A drive root lost its separator on POSIX (fixed).// sight: cd "C:/" gave C: on macOS and Linux, because the host's path rules do not treat C:/ as a root, and sight graph --json printed "working_directory":"C:". A drive root now keeps its separator on every platform; graph prints C:/ as on main. Tests added for the helper and the parser.
include "C:" under sight: cd "C:/other/lib/" (not changed). A call whose whole path is a bare drive letter leaves an empty file name once the drive prefix is dropped. main then probes lib\.do, misses, and falls back to a file beside the script; this branch probes lib.do. Shown at resolver level with injected Windows rules only. A call to a bare drive is not a file reference Stata accepts, so I left it.
Re-verified at 602d1e13: all four gates pass (10,517 tests pass, 0 fail). The reviewer also compared sight check output with main across 18 POSIX fixtures (workspace /, repeated separators, . and .., drive and UNC spellings, a directory ending in a backslash) and found no difference.
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
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.
// sight: cd work/and// sight: cd workname the same directory but resolved to different strings (.../work/and.../work). Those strings are compared and used as keys, so the two spellings could be treated as different directories.The directive parser now drops separators at the end of the resolved directory (
without_trailing_separatorsinsrc/utils/fs-path.ts). A filesystem, drive or UNC root keeps its separator. On POSIX a trailing backslash is part of the name and is kept.Which files a call resolves to does not change: joining a path to either spelling gave the same file before. Two existing tests pinned the trailing separator and are updated.
Proof: new unit tests for the helper under POSIX and Windows rules and for the parser;
sight checkover Stata's 3,780 base ados gives the same 30,118 diagnostics as main, byte for byte. All four gates pass locally.Taken from #435.