Skip to content

test(path): trailing slashes when appending#14279

Merged
Alizter merged 1 commit into
ocaml:mainfrom
Alizter:push-opurvzmlmmmm
Apr 21, 2026
Merged

test(path): trailing slashes when appending#14279
Alizter merged 1 commit into
ocaml:mainfrom
Alizter:push-opurvzmlmmmm

Conversation

@Alizter
Copy link
Copy Markdown
Collaborator

@Alizter Alizter commented Apr 21, 2026

More test cases documenting quirky path behaviour when working on #14278.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter Alizter merged commit 7b3ddc6 into ocaml:main Apr 21, 2026
28 of 30 checks passed
@Alizter Alizter deleted the push-opurvzmlmmmm branch April 21, 2026 14:09
Alizter added a commit that referenced this pull request May 14, 2026
Rather than using `Filename.concat` we use `/` as a directory separator
on all platforms for paths that we construct. We already do this for
local paths, so appending to external paths shouldn't be any different.
This makes path behaviour homogeneous across platforms.

Importantly on Windows something like:

```
C:\foo\bar + ./baz/zaz
``` 
used to be 
```
C:\foo\bar\./baz/zaz
```
and is now 
```
C:\foo\bar/baz/zaz
```
Notice that the prefix is untouched, since we don't control it. When
scrubbing prefixes with `BUILD_PATH_PREFIX_MAP` this will mean that
`$PREFIX/baz/zaz` will be the same on all platforms. That will be
addressed in a later PR.

We do however touch the prefix if it ends in a trailing directory
separator. Before appending we make sure that this separator is stripped
if it exists.


- [x] changelog
- [x] check docs and fixup
- [x] update rocq tests
- [x] update oxcaml tests
- [x] update other tests
- [x] #14279 

Addresses parts of
- #10176
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.

3 participants