Skip to content

Report missing source directories clearly#201

Merged
mrexodia merged 1 commit into
build-cpp:mainfrom
aouxwoux:codex/source-directory-error
Jul 12, 2026
Merged

Report missing source directories clearly#201
mrexodia merged 1 commit into
build-cpp:mainfrom
aouxwoux:codex/source-directory-error

Conversation

@aouxwoux

Copy link
Copy Markdown
Contributor

When a target uses a source glob whose parent directory does not exist, cmkr currently exposes the filesystem iterator exception. Check the directory before iterating and report a target-scoped error that identifies the missing source directory.

Validation:

  • git diff --check
  • Native build/tests not run locally because this environment has no CMake or C++ compiler.

Fixes #109.

@mrexodia

Copy link
Copy Markdown
Contributor

@codex please confirm that the snippet in the closed issue no longer exposes this error.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Confirmed the closed-issue-style sources = ["src/*.cpp"] snippet no longer exposes the raw filesystem iterator error; it now reports a target-scoped error: [cmkr] error: [target.app] Source directory not found: src.
  • Updated source glob expansion handling so exceptions from missing source directories are passed through the existing target-scoped error helper.
  • Committed the change on the current branch: a8d1c81 fix: target-scope missing source dir errors.
  • Created a follow-up PR titled “Preserve target context for missing source dirs”.

Testing

  • cmake --build build -j2
  • tmp=$(mktemp -d); cat > $tmp/cmake.toml <<'EOF' ... EOF; (cd $tmp && /workspace/cmkr/build/cmkr gen) 2>&1; status=$?; echo STATUS:$status; rm -rf $tmp; test $status -ne 0
  • git diff --check
  • ⚠️ ctest --test-dir build --output-on-failure -R globbing (CMake reported no tests were discovered in this build tree)

View task →

@mrexodia mrexodia merged commit 60024ba into build-cpp:main Jul 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Error correctly when trying to access a directory that doesn't exist

2 participants