Skip to content

test(platform): install-layout assertions read the path on any platform - #30

Merged
Dimoshka merged 2 commits into
developfrom
bugfix/windows-platform-tests
Oct 12, 2026
Merged

Dimoshka merged 2 commits into
developfrom
bugfix/windows-platform-tests

Conversation

@Dimoshka

Copy link
Copy Markdown
Contributor

Fixes two Windows-only failures in the windows-latest CI job (seen on develop run 38029954030):

  • Directory(_packageRoot().uri.path + '/lib') — on Windows uri.path is /d:/a/..., leading slash before the drive letter, so the recursive walk threw FileSystemException errno 123. Now uses Directory.path, which is the native spelling on every platform.
  • paths.resolve('state/default').toFilePath() asserted endsWith('state/default') — toFilePath() separates with \\ on Windows. Now asserts on the returned Uri's .path, which is always /-separated, keeping the assertion's intent (the join landed beneath the root).

Verified: melos run analyze, melos run format and the alteri_one_platform test suite pass locally (44/44). The Windows behaviour itself cannot be exercised on this Linux container; the CI Windows job is the real gate. Note melos exec --fail-fast cancels the remaining packages after the first failure, so alteri_one_protocol and the root package tests have not actually run on Windows yet — further Windows-only defects may surface in the same job.

Refs #29

Windows CI checks the tree out with CRLF-free but drive-lettered paths:
uri.path is '/d:/a/...' there, so Directory(uri.path + '/lib') failed with
errno 123, and toFilePath() separates with '\', so the endsWith
'state/default' assertion could never hold. Directory.path and Uri.path
are the platform-independent spellings; both assertions keep their intent.
r'\\' is a two-character string, so the replaceAll matched nothing on
Windows: paths kept their backslashes, lib/src/io/ was not found, and every
native adapter was reported as outside its own directory. Invisible on
Linux, and invisible on Windows until the walk that reached this line was
fixed. The pattern is '\\'.
@Dimoshka
Dimoshka merged commit 1f0b5d4 into develop Oct 12, 2026
15 checks passed
@Dimoshka
Dimoshka deleted the bugfix/windows-platform-tests branch October 12, 2026 11:52
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