Skip to content

test(win): bin layouts use incorrect artifact names on win - #15517

Merged
Alizter merged 1 commit into
ocaml:mainfrom
Alizter:bin-layout-installed-filenames-test
Jul 17, 2026
Merged

test(win): bin layouts use incorrect artifact names on win#15517
Alizter merged 1 commit into
ocaml:mainfrom
Alizter:bin-layout-installed-filenames-test

Conversation

@Alizter

@Alizter Alizter commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Description

Add a native Windows cram test covering the artifact names materialized in %{bin:...} PATH layouts.

The test records the current behavior: a native executable is placed in the layout as extensionless launcher, so Windows command lookup fails, while a declared tool.cmd entry retains its filename. This PR intentionally captures the existing failure as expected output so the test-only change remains independently passing. The production fix will follow in a separate PR and update these expectations.

Validated with the mingw-5.4 opam switch on native Windows 11.

Related Issue and Motivation

Regression coverage for #15512.

This isolates the Windows regression coverage from its fix so both changes can pass CI independently and be reviewed in order.

Checklist

  • Tests added, if applicable.
  • Change log entry not required for this test-only change.
  • Documentation not required for this test-only change.
  • windows tests pass

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter
Alizter merged commit a4d600b into ocaml:main Jul 17, 2026
27 checks passed
@Alizter
Alizter deleted the bin-layout-installed-filenames-test branch July 17, 2026 19:50
@Alizter Alizter added this to the 3.25.0 milestone Jul 18, 2026
@Alizter Alizter mentioned this pull request Jul 20, 2026
56 tasks
Alizter added a commit that referenced this pull request Jul 20, 2026
## Description

Use installed filenames when materializing `%{bin:...}` PATH layouts for
local package binaries.

Artifact lookup keys intentionally omit `.exe` on Windows, but those
keys were also being used as physical layout filenames. Carry the lookup
name together with the installed filename of the selected binary through
the layout key instead. Native executables are therefore materialized as
`launcher.exe`, while explicitly named entries such as `tool.cmd` remain
unchanged.

This updates the Windows regression test added in #15517 from the
documented failure to the corrected behavior.

## Related Issue and Motivation

Fixes #15512.

## Validation

- `./dune.exe build @check @fmt`
- Focused cram test with the `mingw-5.4` opam switch on native Windows
11

## Checklist

- [x] Tests added in #15517 and updated here.
- [x] Change log entry added.
- [x] Documentation not required beyond the regression test.
Alizter added a commit to Alizter/dune that referenced this pull request Jul 20, 2026
## Description

Add a native Windows cram test covering the artifact names materialized
in `%{bin:...}` PATH layouts.

The test records the current behavior: a native executable is placed in
the layout as extensionless `launcher`, so Windows command lookup fails,
while a declared `tool.cmd` entry retains its filename. This PR
intentionally captures the existing failure as expected output so the
test-only change remains independently passing. The production fix will
follow in a separate PR and update these expectations.

Validated with the `mingw-5.4` opam switch on native Windows 11.

## Related Issue and Motivation

Regression coverage for ocaml#15512.

This isolates the Windows regression coverage from its fix so both
changes can pass CI independently and be reviewed in order.

## Checklist

- [x] Tests added, if applicable.
- [x] Change log entry not required for this test-only change.
- [x] Documentation not required for this test-only change.
- [x] windows tests pass

(cherry picked from commit a4d600b)
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Alizter added a commit that referenced this pull request Jul 20, 2026
Backport #15517 and #15518 onto 3.24.1-rc.

This includes the Windows regression test followed by its fix.
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