Skip to content

fix(core): follow the std::filesystem::path fsystem API - #60

Merged
kniz merged 1 commit into
mainfrom
fix/fsystem-path-api
Aug 22, 2026
Merged

kniz merged 1 commit into
mainfrom
fix/fsystem-path-api

Conversation

@kniz-bot

Copy link
Copy Markdown
Contributor

Why

indep refactored the fsystem API to return std::filesystem::path (a3e8809 → 6d97d43), removing fsystem::getDelimiter() and fsystem::iterator::getName(). stela already absorbed that change in 5d0aed4, but byeol was still pinned to stela 2073f33, so nothing downstream had moved yet.

Raising the pin to stela 3d39295 is what makes the break visible — it surfaces five compile errors, all in podLoader.cpp.

What changed

module/core/CMakeLists.txt — stela pin 2073f33 → 3d39295, which brings in indep 6d97d43.

module/core/loader/pod/podLoader.cpp — the real work. Path joining used to go through an explicit delimiter, and that no longer has an API to lean on:

  • _interpManifest() stored getDelimiter() + path in entrypoint::paths, prefixing a separator at parse time so that _addNewPod() could later concatenate it onto the pod directory. The path is now stored exactly as the manifest wrote it, and _addNewPod() does the join with operator/. This removes the asymmetry where one half of the path was assembled at parse time and the other half at load time — only _addNewPod() knows the pod directory, so the join belongs there.
  • e.getName() != MANIFEST_FILENAME → e->filename() != MANIFEST_FILENAME.
  • e.getDir() + getDelimiter() + e.getName() is by definition e.get(), so that line collapses.
  • getCurrentDir() + getDelimiter() + path → (cwd / path).

module/core/worker/supply/srcSupply.cpp — const std::string& filePath = *e; was binding a reference to the result of path::operator string_type(). It compiles on POSIX because the temporary's lifetime is extended, but string_type is std::wstring on Windows, so this would have failed the Windows CI job. Now asks for e->string() outright.

This one did not appear in the error list — it is a latent break the pin bump would have exposed only on Windows.

Verification

Built through the real pin (no FETCHCONTENT_SOURCE_DIR override), resolving stela 3d39295 → indep 6d97d43:

[==========] 1210 tests from 88 test suites ran. (75672 ms total)
[  PASSED  ] 1210 tests.

Path assembly was checked for behavioural equivalence at runtime, not just at compile time. podLoaderTest.testDefaultLoaderInit logs:

pod[cpp] loads origins from pod/sys/./sys.pod

"pod/sys" + "/" + "./sys.pod" (before) and path("pod/sys") / "./sys.pod" (after) produce the same string. The sys pod's native .so and its byeol wrapper both load, and add(5, 3) == 8 evaluates.

clang-format-18 clean. The added } // namespace by in srcSupply.cpp is the formatter's doing — the new comment pushes that namespace past clang-format's short-namespace threshold — not a hand edit.

Deliberately left out

No test was added. The change is a migration to a renamed API with no behavioural delta, and the existing podLoaderTest coverage already exercises the path assembly end to end.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BjENpT4q5ebxNQ5gp951PD

indep moved the fsystem API over to std::filesystem::path and dropped
getDelimiter() and iterator::getName() along the way. stela already
absorbed that, so raising the stela pin is what makes the break visible
here.

Joining paths by hand around an explicit delimiter is the part that no
longer has an API to lean on. _interpManifest() now stores the entrypoint
path exactly as the manifest wrote it and leaves the join to
_addNewPod(), which is the only place that knows the pod directory. That
removes the asymmetry where one half of the path was assembled at parse
time and the other half at load time.

srcSupply was binding a reference to path::operator string_type(). That
survives on POSIX because the temporary's lifetime is extended, but
string_type is wstring on Windows, so ask for the narrow form outright.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BjENpT4q5ebxNQ5gp951PD
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kniz
kniz merged commit 6590e36 into main Aug 22, 2026
10 checks passed
@kniz
kniz deleted the fix/fsystem-path-api branch August 22, 2026 09:08
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.

2 participants