Find open easybuild-easyconfigs pull requests that add the same software¶
Two open pull requests (PRs) on easybuild-easyconfigs sometimes add the
same easyconfig, or need the same new dependency.
eb-stack pr-overlap --kind easyconfigs reads the changed .eb files
and reports the new modules each PR would build. The report then names
each file and module that two or more PRs add. Compare those pull
requests before you merge.
Run it before you merge a batch of open easybuild-easyconfigs PRs, or when a review needs to see whether another open PR already adds the same software. The command reads easyconfig text as data and leaves the pull requests untouched. Two build jobs that install into the same prefix can overwrite a shared module: the later install wins.
For each PR, dependency resolution starts with the tree passed through
--easyconfigs. Easyconfigs from the other input PRs are also visible,
below the current PR’s own changes. This lets the report detect when
one PR supplies a dependency needed by another.
Run the recorded pull requests¶
tests/pr_overlap_easyconfigs_open/ records four open PRs from
2026-10-24. The files under tree/ are a subset of easybuild-easyconfigs
at the commit named in develop-sha, enough to follow the dependencies
of these four PRs.
eb-stack pr-overlap --kind easyconfigs \
--pr tests/pr_overlap_easyconfigs_open/prs.json \
--easyconfigs tests/pr_overlap_easyconfigs_open/tree \
--generated-at 2026-10-24T00:00:00Z \
--repo-url https://github.com/easybuilders/easybuild-easyconfigs \
--merge-order \
--out-dir /tmp/ec-order-out
It prints one line and exits 0.
prs=4 records=4 shared_modules=1 skipped_easyconfigs=0 out=/tmp/ec-order-out
Field |
Meaning |
|---|---|
|
Pull requests read. |
|
Pull requests that changed an easyconfig. |
|
Modules in more than one build set. |
|
Easyconfig files in the tree the parser could not read. |
|
Directory with the Markdown report, the index, and the per-PR records. |
This run passes no --installed list. The build set is then every
closure module missing from the base tree, plus every easyconfig the PR
edits. The run writes
/tmp/ec-order-out/overlap.md, overlap.toml, merge-order.toml,
and one prs/<N>.toml per PR. After a short header, overlap.md names the
shared file first.
## same-file
| Path | Pull requests |
|---|---|
| `easybuild/easyconfigs/m/Mathematica/Mathematica-14.2.1.eb` | [#22823](https://github.com/easybuilders/easybuild-easyconfigs/pull/22823), [#24575](https://github.com/easybuilders/easybuild-easyconfigs/pull/24575) |
Read the report¶
A PR’s closure is every module its changed easyconfigs depend on,
directly or through other dependencies. The build set (to_build) is
the modules it would still build. With no installed list, that is the
modules the base tree does not already have (“new” in the report) and
the easyconfigs the PR edits. The
same terms for an easystack line are in
from one easystack line to a build set.
Start with the four sections at the top of overlap.md. Then read the
section for the PR under review.
same-filemeans two PRs change the same path. Here 22823 and 24575 both addMathematica-14.2.1.eb. Compare the file contents and review status, choose the PR to keep, then close or rebase the duplicate before merging.same-modulemeans two PRs produce the same module name, even if their paths differ. Compare the recipes and coordinate the PRs so only the intended recipe is built and installed.shared-new-moduleis a module that is new in more than one closure. The next section of the report repeatsMathematica/14.2.1, because the base tree does not already provide it. That is the one module counted inshared_modules.depends-onisNonein this run. A row there means one PR has to wait for another open PR. Either the other PR adds a module this PR’s closure needs, or it edits or deletes a module this PR builds a dependent of. The PR that adds or edits the module comes first.
The summary line below each PR heading reports how many easyconfigs changed, how many modules the dependency walk reached, how many are new to the base tree, and how many would be built. In that line, “new” means the base tree does not already contain the module, while “Builds” is the build set. With no installed list, a large closure can still build one module.
22823 and 24575 each have a closure of one new module,
Mathematica/14.2.1. 27131 adds aria2: closure 53, one new,
aria2/1.37.0-GCCcore-15.2.0. 27215 changes four nghttp3 easyconfigs.
All four are in its build set: one added file, and three edited files
that the base tree already has. An edited easyconfig is always rebuilt, so it
stays in the build set even though it is not new. The closure has 152
modules and one new module, nghttp3/1.13.1-GCCcore-13.2.0, which needs
CUnit ==2.1-3. The build list still names that module, and the
requirement is unresolved. Until an easyconfig for that CUnit version
is in the tree, treat the build set as incomplete. Look for an open PR
that adds CUnit, or ask the author to add it. The reverse-dependents
line shows what the edits affect, for example
`nghttp2/1.69.0-GCCcore-15.2.0` (1, no-rebuild). The number is how
many dependency hops that module is from the changed file: 1 means it
depends on it directly. The word is the rebuild class. must-rebuild
dependents join the build set, while review and no-rebuild ones are
listed for you to check. Every dependent here is no-rebuild. The checked-in copy of
this run is tests/pr_overlap_easyconfigs_open/expected/overlap.md.
Investigate every unresolved item before relying on a closure. Review
reverse dependents as compatibility and rebuild candidates. A closure or a
proposed order does not show that an easyconfig builds or passes its
tests.
A closure also counts modules that are already installed. To drop
those from the build set, pass --installed with one Name/version
per line. Each run rewrites prs/ to hold only the PRs
of that run.
Fetch open pull requests¶
examples/easyconfigs-pr-overlap/fetch-prs.sh in the eb-stack checkout
writes one JSON file per open PR that changes an easyconfig. Run it
from a clone of easybuild-easyconfigs whose origin is that
repository, with gh authenticated for public reads. Set
EB_STACK_CHECKOUT to the eb-stack checkout. The script reads base
text from develop and does not check a PR out. Open pull requests
are read 100 per page, with no stop at 500. Changed files are read
100 per page through GitHub’s cap of 3000. A pull request whose file
list stops there is still written, with file_list_truncated set.
pr-overlap notes truncated at GitHub's limit.
: "${EB_STACK_CHECKOUT:?set this to an eb-stack checkout}"
"$EB_STACK_CHECKOUT/examples/easyconfigs-pr-overlap/fetch-prs.sh" \
easybuilders/easybuild-easyconfigs /tmp/ec-in
Pass /tmp/ec-in/prs/*.json as --pr, with --easyconfigs set to a
checkout of the base tree. --base-ref selects the base-file text
downloaded by --open and defaults to develop. It does not select or
validate the checkout passed through --easyconfigs. Use a checkout
and a base ref for the same revision. --repo-url defaults to
https://github.com/easybuilders/easybuild-easyconfigs for this kind.
If EASYBUILD_FILTER_DEPS is set and you omit --filter-deps, the
command drops those dependencies. The recorded run had the variable
unset.
--open OWNER/NAME reads the open PRs over HTTPS. When
GITHUB_TOKEN or GH_TOKEN is set, the command sends it to
api.github.com. Without a token GitHub allows 60 API calls an hour, and
the command makes at least one call per open PR, so an unauthenticated
run suits a repository with a few dozen open PRs at most. For
easybuild-easyconfigs, which has hundreds, set a token or use
fetch-prs.sh above. A pull request with more than 3000 changed files is
still included. The record notes truncated at GitHub's limit and lists
the files GitHub returned. This command writes the same report, fetched by
--open:
eb-stack pr-overlap --kind easyconfigs \
--open easybuilders/easybuild-easyconfigs \
--easyconfigs "$EB_EASYCONFIGS" \
--out-dir /tmp/ec-live
Choose a merge order¶
--merge-order on the command above writes merge-order.toml and
appends this table to overlap.md:
## Merge order
| Position | PR | Builds | Saves | After |
|---|---|---|---|---|
| 1 | [#22823](https://github.com/easybuilders/easybuild-easyconfigs/pull/22823) | 1 | [#24575](https://github.com/easybuilders/easybuild-easyconfigs/pull/24575) (`Mathematica/14.2.1`) | |
| 2 | [#24575](https://github.com/easybuilders/easybuild-easyconfigs/pull/24575) | 0 | | |
| 3 | [#27131](https://github.com/easybuilders/easybuild-easyconfigs/pull/27131) | 1 | | |
| 4 | [#27215](https://github.com/easybuilders/easybuild-easyconfigs/pull/27215) | 4 | | |
Builds is how many modules that PR still has left to build once earlier
rows are done. Position 1 builds Mathematica/14.2.1. In the Saves cell,
PR 24575 drops that module, and position 2 has nothing left to
build. That row is the same-file duplicate: compare
the files, keep one PR, and close or rebase the other. It is not a
second module to install. Position 3 builds aria2, and position 4 builds the four nghttp3 modules.
After is blank because no PR needs a module that only another open PR
adds. When a depends-on row exists, After names the PR that adds or
edits the module, and --impact on that PR lists the module under
resolves. 27215 edits three nghttp3 files. No other PR here builds
a dependent of them, so no row starts at 27215. When two or more
PRs could go next, the fewest modules left to
build wins, then the lowest PR number. Module names are in
merge-order.toml.
--impact N writes merge-impact.toml for that PR alone. For easystack
changes on a European Environment for Scientific Software
Installations (EESSI) software-layer repository, and for the
--impact fields, see
find shared builds across open pull requests.