projects, make: Follow pkg.recommends.jw in the build closure #121

Merged
Jan Lindemann merged 5 commits from jan/feature/20260922-build-recommends into master 2026-09-22 09:58:37 +02:00 AGit

This PR makes the relations of the workspace build closure a workspace property: projects build and required-os-pkg grow a --pkg-relations option, defaulting to requires, so direct invocations keep their behaviour; DEP_PROJECTS is derived from the very build order that make all and the workspace mount use; and a new PKG_RELATIONS_BUILD variable threads the choice through every build invocation of the workspace. The final commit sets it to requires,recommends, so that recommended projects get built and released along with their recommenders by default.

cmds.projects.CmdBuild: Add --pkg-relations

The relations the build closure of projects build follows are hard-coded in read_deps(): [pkg.requires.jw] only. A workspace that also wants to build the projects its seeds recommend in [pkg.recommends.jw] has no way to say so.

Add a --pkg-relations option that lists the relations between jw packages to take into consideration for the build, comma or space separated, defaulting to requires.

cmds.projects.CmdRequiredOsPkg: Add --pkg-relations

The OS package list of required-os-pkg, like the build closure, is derived from the [pkg.requires.jw] section only, hard-coded in _run(). Add a --pkg-relations option to required-os-pkg, mirroring the one of CmdBuild.

projects-dir.mk: Derive DEP_PROJECTS from the build order

DEP_PROJECTS is computed with pkg-requires --recursive, which follows [pkg.requires.jw] only. That set does not match what the build actually builds, and it omits seed projects that no other project of the closure depends on.

Derive DEP_PROJECTS from projects build --build-order with the same dependency flavours as make all, the very command the build-order make target and the workspace mount closure (mount-projects-dir.sh) use. DEP_PROJECTS is now exactly the build closure, so the file listings, the text-files cache and the git helpers of a workspace cover the same project set as make all.

Introduce the PKG_RELATIONS_BUILD variable, defaulting to requires, and pass it through JW_PKG_PY_BUILD to every build invocation of the workspace, so the relations of the build closure are a workspace property.

projects-dir.mk: Add JW_PKG_PY_REQUIRED_OS_PKG

Add and use JW_PKG_PY_REQUIRED_OS_PKG. The variable and its use effectively ties more targets to act on the same package set as the make all, influenced by the contents of $(PKG_RELATIONS_BUILD):

  • echo-build-deps
  • echo-install-deps
  • echo-release-deps
  • pkg-install-build-deps
  • pkg-install-release-deps

projects-dir.mk: PKG_RELATIONS_BUILD += recommends

Add recommended projects into the build closure. Would be nice if they got built along. Let's see if nightly survives it.

This PR makes the relations of the workspace build closure a workspace property: `projects build` and `required-os-pkg` grow a `--pkg-relations` option, defaulting to requires, so direct invocations keep their behaviour; `DEP_PROJECTS` is derived from the very build order that `make all` and the workspace mount use; and a new `PKG_RELATIONS_BUILD` variable threads the choice through every build invocation of the workspace. The final commit sets it to requires,recommends, so that recommended projects get built and released along with their recommenders by default. #### cmds.projects.CmdBuild: Add --pkg-relations The relations the build closure of `projects build` follows are hard-coded in `read_deps()`: [`pkg.requires.jw`] only. A workspace that also wants to build the projects its seeds recommend in [`pkg.recommends.jw`] has no way to say so. Add a `--pkg-relations` option that lists the relations between jw packages to take into consideration for the build, comma or space separated, defaulting to requires. #### cmds.projects.CmdRequiredOsPkg: Add --pkg-relations The OS package list of `required-os-pkg`, like the build closure, is derived from the [`pkg.requires.jw`] section only, hard-coded in `_run()`. Add a `--pkg-relations` option to `required-os-pkg`, mirroring the one of `CmdBuild`. #### projects-dir.mk: Derive DEP_PROJECTS from the build order `DEP_PROJECTS` is computed with `pkg-requires` `--recursive`, which follows [`pkg.requires.jw`] only. That set does not match what the build actually builds, and it omits seed projects that no other project of the closure depends on. Derive `DEP_PROJECTS` from `projects build` `--build-order` with the same dependency flavours as `make all`, the very command the build-order make target and the workspace mount closure (`mount-projects-dir.sh`) use. `DEP_PROJECTS` is now exactly the build closure, so the file listings, the text-files cache and the git helpers of a workspace cover the same project set as `make all`. Introduce the `PKG_RELATIONS_BUILD` variable, defaulting to requires, and pass it through `JW_PKG_PY_BUILD` to every build invocation of the workspace, so the relations of the build closure are a workspace property. #### projects-dir.mk: Add JW_PKG_PY_REQUIRED_OS_PKG Add and use `JW_PKG_PY_REQUIRED_OS_PKG`. The variable and its use effectively ties more targets to act on the same package set as the `make all`, influenced by the contents of `$(PKG_RELATIONS_BUILD)`: - `echo-build-deps` - `echo-install-deps` - `echo-release-deps` - `pkg-install-build-deps` - `pkg-install-release-deps` #### projects-dir.mk: PKG_RELATIONS_BUILD += recommends Add recommended projects into the build closure. Would be nice if they got built along. Let's see if nightly survives it.
The relations the build closure of projects build follows are hard-coded in
read_deps(): [pkg.requires.jw] only. A workspace that also wants to build
the projects its seeds recommend in [pkg.recommends.jw] has no way to say
so.

Add a --pkg-relations option that lists the relations between jw packages
to take into consideration for the build, comma or space separated,
defaulting to requires.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.86.1
The OS package list of required-os-pkg, like the build closure, is derived
from the [pkg.requires.jw] section only, hard-coded in _run(). Add a
--pkg-relations option to required-os-pkg, mirroring the one of CmdBuild.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.86.1
DEP_PROJECTS is computed with pkg-requires --recursive, which follows
[pkg.requires.jw] only. That set does not match what the build actually
builds, and it omits seed projects that no other project of the closure
depends on.

Derive DEP_PROJECTS from projects build --build-order with the same
dependency flavours as make all, the very command the build-order make
target and the workspace mount closure (mount-projects-dir.sh) use.
DEP_PROJECTS is now exactly the build closure, so the file listings, the
text-files cache and the git helpers of a workspace cover the same project
set as make all.

Introduce the PKG_RELATIONS_BUILD variable, defaulting to requires, and
pass it through JW_PKG_PY_BUILD to every build invocation of the workspace,
so the relations of the build closure are a workspace property.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.86.1
Add and use JW_PKG_PY_REQUIRED_OS_PKG. The variable and its use effectively
ties more targets to act on the same package set as the make all, influenced
by the contents of $(PKG_RELATIONS_BUILD):

  echo-build-deps
  echo-install-deps
  echo-release-deps
  pkg-install-build-deps
  pkg-install-release-deps

Signed-off-by: Jan Lindemann <jan@janware.com>
projects-dir.mk: PKG_RELATIONS_BUILD += recommends
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m31s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m35s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m9s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m38s
CI / Packaging test (push) Successful in 0s
c7c9779e40
Add recommended projects into the build closure. Would be nice if they got
built along. Let's see if nightly survives it.

Signed-off-by: Jan Lindemann <jan@janware.com>
Jan Lindemann scheduled this pull request to auto merge when all checks succeed 2026-09-22 09:48:28 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
janware/jw-pkg!121
No description provided.