docs: two lists for one sibling now stop the build
All checks were successful
Flatpak / flatpak (pull_request) Successful in 7m49s
All checks were successful
Flatpak / flatpak (pull_request) Successful in 7m49s
The README and the spec comment said that a project two paths load with different lists ends up in the program twice. They now say the build stops, with an error that names both paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3d2023cb5c
commit
34874c7143
2 changed files with 4 additions and 4 deletions
|
|
@ -74,7 +74,7 @@ Configuration* sibling = LocalProject({ .projectFile = "../Crafter.Math/project.
|
||||||
cfg.dependencies = { math };
|
cfg.dependencies = { math };
|
||||||
```
|
```
|
||||||
|
|
||||||
The sibling's `CrafterBuildProject` gets the args this `project.cpp` was loaded with (`ProjectArgs()`), so `--target=`, `--march=`, `--debug` and the project's own flags reach every sibling down the chain. That is all of them: `cfg.projectArgs` holds only what `ApplyStandardArgs` did not interpret, and passing it on would drop the target and the build type. Set `.args` to send something else: `{}` for nothing, or a list built from the project's args, such as one without a flag only this project reads. Build such a list once and give it to every sibling. A project that two paths load with different lists is built twice, and the program ends up with both builds. Releases up to 2.2.0 forward nothing when `.args` is left out.
|
The sibling's `CrafterBuildProject` gets the args this `project.cpp` was loaded with (`ProjectArgs()`), so `--target=`, `--march=`, `--debug` and the project's own flags reach every sibling down the chain. That is all of them: `cfg.projectArgs` holds only what `ApplyStandardArgs` did not interpret, and passing it on would drop the target and the build type. Set `.args` to send something else: `{}` for nothing, or a list built from the project's args, such as one without a flag only this project reads. Build such a list once and give it to every sibling. A project that two paths load with different lists would end up in the program twice, so the build stops with an error that names both paths. Releases up to 2.2.0 forward nothing when `.args` is left out.
|
||||||
|
|
||||||
The default is read when the spec is made, so make it inside `CrafterBuildProject`, on the thread that calls it. A spec made at namespace scope, on a thread of your own or in a script forwards nothing.
|
The default is read when the spec is made, so make it inside `CrafterBuildProject`, on the thread that calls it. A spec made at namespace scope, on a thread of your own or in a script forwards nothing.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,9 +97,9 @@ export namespace Crafter {
|
||||||
// --debug and the project's own flags reach every sibling down a chain
|
// --debug and the project's own flags reach every sibling down a chain
|
||||||
// without being passed. Set them to forward something else: {} for
|
// without being passed. Set them to forward something else: {} for
|
||||||
// nothing, or a list built from this project's args, such as one without
|
// nothing, or a list built from this project's args, such as one without
|
||||||
// a flag only this project reads. Give such a list to every sibling: a
|
// a flag only this project reads. Give such a list to every sibling:
|
||||||
// project that two paths load with two different lists is built twice,
|
// Build() refuses a graph in which two paths load one project with two
|
||||||
// and the program ends up with both builds.
|
// different lists, since the program would end up with both builds.
|
||||||
struct GitProjectSpec {
|
struct GitProjectSpec {
|
||||||
GitSource source;
|
GitSource source;
|
||||||
fs::path projectFile = "project.cpp";
|
fs::path projectFile = "project.cpp";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue