Merge branch 'claude/forward-project-args': sibling projects inherit the args, lint with the lite rules

PR #40. GitProject and LocalProject default their args to the loading
project's own (ProjectArgs()), this tree lints with LintRules' lite
set, and the fixes from the branch's review: a project file gets its
args only for the CrafterBuildProject call, host tooling gets project
cache entries of its own, and `--` ends crafter-build's options.

The conflicts with claude/dependency-notes are all places both sides
added to:
- Platform.cppm and Platform.cpp: PragmaDependencies() beside
  ProjectArgs() and LoadingHostTooling(), all three kept.
- LoadProject: the record PragmaDependencies() reads moves up with the
  frame's dependencies, which this branch sets before dlopen. Left
  where it was, it would have copied preDeps.configs after the vector
  was moved into the frame, and recorded nothing.
- README: the pragma section's new last sentence goes before the new
  "Dependency notes for agents" section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-10-31 05:27:37 +01:00
commit 75142276ab
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
23 changed files with 599 additions and 62 deletions

View file

@ -394,11 +394,12 @@ Configuration* Crafter::GitProject(const GitProjectSpec& spec) {
// source revision (forwarded args don't change what gets cloned, just
// how the dep's project.cpp interprets them at runtime), while the
// in-memory Configuration is keyed by the full spec so each (args)
// permutation gets its own Configuration object.
// permutation gets its own Configuration object, and host tooling one
// apart from the target's even for the same args.
std::string srcKey = std::format("git|{}|{}|{}|{}", spec.source.url, spec.source.branch, spec.source.commit, spec.projectFile.string());
std::string srcHash = std::format("{:016x}", std::hash<std::string>{}(srcKey));
std::string fullKey = srcKey;
std::string fullKey = std::format("{}{}", LoadingHostTooling() ? "host|" : "", srcKey);
for (const std::string& a : spec.args) {
fullKey += '|';
fullKey += a;
@ -482,7 +483,7 @@ Configuration* Crafter::LocalProject(const LocalProjectSpec& spec) {
}
fs::path canonical = fs::canonical(projectPath);
std::string fullKey = std::format("local|{}", canonical.string());
std::string fullKey = std::format("{}local|{}", LoadingHostTooling() ? "host|" : "", canonical.string());
for (const std::string& a : spec.args) {
fullKey += '|';
fullKey += a;