Skip to content

fix(stdune): relativize external paths on Windows - #14663

Closed
Alizter wants to merge 2 commits into
ocaml:mainfrom
Alizter:push-nnlxvwlypuul
Closed

Alizter wants to merge 2 commits into
ocaml:mainfrom
Alizter:push-nnlxvwlypuul

Conversation

@Alizter

@Alizter Alizter commented May 22, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Path.External.reach previously returned its input unchanged on Windows.
Relativize paths when the source and destination share a current-drive root,
drive letter, or UNC share, including the corresponding extended path forms.
Paths crossing drives, UNC shares, or root kinds remain absolute.

Enable the stdune path tests in @runtest-windows.

Related Issue and Motivation

This completes the Windows support left out of #15077 and lets the path tests
introduced after #14616 run on Windows.

@Alizter Alizter added the windows Issues that relate to Dune on Microsoft Windows label May 22, 2026
Alizter added a commit that referenced this pull request May 28, 2026
…t separators (#14616)

Replace `Filename.concat` with `External.append_local` when stringifying
external build paths with a local suffix. This ensures forward slashes
are used on all platforms, removing the need for conditional
Windows/Unix test expectations.

- Followup to #14278.
- Followed up by #14663 

- Contributes to #10176
@Alizter
Alizter force-pushed the push-nnlxvwlypuul branch 2 times, most recently from f338b81 to 71e932b Compare August 30, 2026 18:27
@Alizter Alizter changed the title test: enable path tests on windows fix(stdune): relativize external paths on Windows Aug 30, 2026
Teach the tests about the current Windows external-path behavior before adding
Windows relativization.

Signed-off-by: Ali Caglayan <[email protected]>
@Alizter
Alizter force-pushed the push-nnlxvwlypuul branch from 71e932b to f1e3142 Compare August 31, 2026 09:10
@Alizter

Alizter commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by the following draft stack now that the scope has grown:

@Alizter Alizter closed this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

windows Issues that relate to Dune on Microsoft Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant