Repository navigation
adopt-project.py, shape_materialize.py and the assembly-root template: after #1121 and #1105, one GNU_MAKE_READS and one lookup, their NEXT NOTE and collision line as true as #1207's, and the NITs 1, 3b, 3c, 4 and 5 of #1105's second review #1240
Description
(lane openRepoShape-5. These are #1132's items that #1207 leaves, because they live only in lane 4's #1105 (#1048) and #1121 (#1047). #1132 is shut when #1207 lands, so this issue tracks them: #1207's review, issuecomment-6374516382, SHOULD-2.)
Problem
#1207 does the parts of #1132 that hold on main. Lane 4 lands #1105 and #1121 as reviewed, with no fix round, #1121 first, and hands their items to lane 5 (#473 issuecomment-6350568104: "Your list above is the record of what moves to lane 5"). Once both land, main has the following. Letters name them below. "Item N" is #1132's own numbering, and "RV1105b" is #1105's second review (issuecomment-6321479057).
- A. Two tuples and three lookups (item 4). shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps a
GNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105 adds a secondGNU_MAKE_READStoshape_materialize.py, and a test that holds the two equal. shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps aGNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105's_predict_collisionsand adopt-project.py:execute's NEXT printspython3 scripts/bootstrap.pywhere GNU make at the root reads a keptGNUmakefileormakefile, and its NOTE names that file and what it takes formake bootstrapto run there (#1047) #1121's_next_stepseach write their ownnext(... for name in GNU_MAKE_READS ...), beside_makefile_follow_up's. adopt-project.py, shape_materialize.py and the assembly-root template: a keptGNUmakefile/is a directory GNU make stops at,python3 scripts/bootstrap.pynamespythonon Windows, and the template says what to run wheremakereads another file #1207 adds_make_reads_first, which all three can share. - B. shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps a
GNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105's collision line calls a kept DIRECTORY a file (item 2). At a root that keepsMakefileandGNUmakefile/, the Makefile's collision follow-up says "GNU make at the root reads the source'sGNUmakefile, ... so the shape's make targets ... reachmakethere only onceGNUmakefilehas them, or includes a Makefile that does". GNU make 4.3 stops at that directory for every target:make: *** GNUmakefile: Is a directory. Stop., exit 2. adopt-project.py, shape_materialize.py and the assembly-root template: a keptGNUmakefile/is a directory GNU make stops at,python3 scripts/bootstrap.pynamespythonon Windows, and the template says what to run wheremakereads another file #1207 fixed the same claim in theCONTRACTS_DIRline and in NEXT. - C. shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps a
GNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105's collision line and adopt-project.py:execute's NEXT printspython3 scripts/bootstrap.pywhere GNU make at the root reads a keptGNUmakefileormakefile, and its NOTE names that file and what it takes formake bootstrapto run there (#1047) #1121's NEXT NOTE namepython3alone (item 3). Both say "python3 scripts/bootstrap.pyis what the shape'smake bootstrapruns". The template'sscripts/bootstrap.pysays "(python on Windows)", and adopt-project.py, shape_materialize.py and the assembly-root template: a keptGNUmakefile/is a directory GNU make stops at,python3 scripts/bootstrap.pynamespythonon Windows, and the template says what to run wheremakereads another file #1207'sBOOTSTRAP_COMMANDsays it everywhere else. - D. adopt-project.py:
execute's NEXT printspython3 scripts/bootstrap.pywhere GNU make at the root reads a keptGNUmakefileormakefile, and its NOTE names that file and what it takes formake bootstrapto run there (#1047) #1121's NOTE beside a keptMakefileleaves out the merge. For a kept FILEGNUmakefilebeside a keptMakefile, it says the targets "run there only onceGNUmakefilehas them, or includes a Makefile that does". WhereGNUmakefileincludesMakefile, the root'sMakefileis still the source's own until the follow-up merges the two. adopt-project.py, shape_materialize.py and the assembly-root template: a keptGNUmakefile/is a directory GNU make stops at,python3 scripts/bootstrap.pynamespythonon Windows, and the template says what to run wheremakereads another file #1207's review found the same gap in adopt-project.py, shape_materialize.py and the assembly-root template: a keptGNUmakefile/is a directory GNU make stops at,python3 scripts/bootstrap.pynamespythonon Windows, and the template says what to run wheremakereads another file #1207's directory NOTE (its NIT-3), and adopt-project.py, shape_materialize.py and the assembly-root template: a keptGNUmakefile/is a directory GNU make stops at,python3 scripts/bootstrap.pynamespythonon Windows, and the template says what to run wheremakereads another file #1207 now names the merge there. - E. RV1105b's NIT-1, the link case. Four comments say the merge alone brings the targets "only where that file includes
Makefile". That is untrue where the file is a symlink toMakefile. RV1105b measuredMakefile+GNUmakefile -> Makefile: there, the merge alone mademake bootstraprun the shape's recipe. - F. RV1105b's NIT-3b: "the words
execute's NEXT uses (adopt-project.py:execute's NEXT printsmake bootstrapwhere GNU make at the root reads a keptmakefileorGNUmakefile, which has nobootstraprule #1047)". This is incollision_follow_up's docstring, and the test module says "The words are those ofexecute's NEXT". It is true only once adopt-project.py:execute's NEXT printspython3 scripts/bootstrap.pywhere GNU make at the root reads a keptGNUmakefileormakefile, and its NOTE names that file and what it takes formake bootstrapto run there (#1047) #1121 lands. adopt-project.py, shape_materialize.py and the assembly-root template: a keptGNUmakefile/is a directory GNU make stops at,python3 scripts/bootstrap.pynamespythonon Windows, and the template says what to run wheremakereads another file #1207 changes NEXT's words, so check it again once all three have landed. - G. RV1105b's NIT-3c:
Materialized.follow_ups(). shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps aGNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105's docstring says it "would say this of them". It passes noreads_first, so it would not, and nothing calls it. - H. RV1105b's NIT-4: no row ties shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps a
GNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105's template clause tomake. Its mutant K9 put both the template andADOPTED_SENTENCESback to "and never the shape's Makefile", and all 118 rows passed. - I. RV1105b's NIT-5, cosmetic. shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps a
GNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105's template paragraph leaves a short line, "does. A SCAFFOLDED". Its test docstring breaks mid-sentence: "The tail says what the". - J.
_make_reads_first_clause'shasargument goes live. On adopt-project.py, shape_materialize.py and the assembly-root template: a keptGNUmakefile/is a directory GNU make stops at,python3 scripts/bootstrap.pynamespythonon Windows, and the template says what to run wheremakereads another file #1207 it is reached only withdoes, so adopt-project.py, shape_materialize.py and the assembly-root template: a keptGNUmakefile/is a directory GNU make stops at,python3 scripts/bootstrap.pynamespythonon Windows, and the template says what to run wheremakereads another file #1207's mutant M18 is equivalent there. It goes live once adopt-project.py:execute's NEXT printspython3 scripts/bootstrap.pywhere GNU make at the root reads a keptGNUmakefileormakefile, and its NOTE names that file and what it takes formake bootstrapto run there (#1047) #1121's NOTE words its file case through that helper.
Measured
This was measured offline at #1105 b28f40de0, #1121 1c5173758, main e04826db4 and #1207 75c90b6db, with git grep and the lane's text probe. The probe loads each head's adopt-project.py and shape_materialize.py, and renders the three texts for a set of roots. Its extracted trees match each head byte for byte.
| where | |
|---|---|
| A | GNU_MAKE_READS = is at main's adopt-project.py:3799 only. At #1105 it is at adopt-project.py:3712 and scripts/shape_materialize.py:784. Lookups: #1105's adopt-project.py:3747 and :6369, and #1121's adopt-project.py:3747 and :15674. |
| B, C | #1105's rendered collision line for Makefile + GNUmakefile/ is quoted in B. Its meanwhile is at #1105's scripts/shape_materialize.py:1110 and :1121. |
| C, D | #1121's rendered NEXT for Makefile + GNUmakefile: "NOTE the root keeps its own Makefile and the shape's is shape/Makefile, and GNU make at the root reads the source's GNUmakefile, ... so make bootstrap and the shape's other make targets run there only once GNUmakefile has them, or includes a Makefile that does; python3 scripts/bootstrap.py is what the shape's make bootstrap runs." The code is at #1121's adopt-project.py:15695 and :15697. |
| E | At #1105: scripts/shape_materialize.py:773 (the SHAPE_MAKE_TARGETS comment) and :1039 (collision_follow_up's docstring), tests/test_pinned_copy_text.py:76 (the ADOPTED_SENTENCES comment, "only where that file includes it"), and tests/test_adopt_collision_make_reads.py:34 (the module docstring). A fifth, :178 in the same file, says the merge alone "turns on whether the file includes Makefile". |
| F | #1105's scripts/shape_materialize.py:1047 |
| G | #1105's scripts/shape_materialize.py:1014. def follow_ups is at :3361, and git grep '\.follow_ups()' finds only the docstring. |
| H | RV1105b's mutant K9: 0 of 118 rows failed |
| I | #1105's templates/assembly-root/AGENTS-shape.md:90 and tests/test_adopt_collision_make_reads.py:160 |
| J | #1207's mutant M18 survived, and it is equivalent on main |
At #1207 75c90b6db, _make_reads_first_clause(first, reach, "has them") for GNUmakefile gives #1121's own reads clause byte for byte. So #1121's file case can go through it with no change to its words.
Suggested fix
Do this after #1121, #1105 and #1207 have landed. #1207 lands after both and resolves its conflict with each. Where that resolution already does an entry, its round says which one, and this issue keeps the rest.
- A:
adopt-project.pyimportsGNU_MAKE_READSfromshape_materialize, as it already importsBOOTSTRAP. The equality test becomes anistest._make_reads_firstis the one lookup for_makefile_follow_up,_predict_collisions'reads_firstand_next_steps, and_make_reads_first_clausemoves toshape_materialize.py. - B:
collision_follow_uptakesreads_firstwith its/, and says the directory stops GNU make, in_make_reads_first_clause's words. - C:
BOOTSTRAP_COMMANDgoes into adopt-project.py:execute's NEXT printspython3 scripts/bootstrap.pywhere GNU make at the root reads a keptGNUmakefileormakefile, and its NOTE names that file and what it takes formake bootstrapto run there (#1047) #1121's NOTE and shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps aGNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105'smeanwhile. The command lines a person pastes staypython3 scripts/bootstrap.py. - D: beside a kept
Makefile, adopt-project.py:execute's NEXT printspython3 scripts/bootstrap.pywhere GNU make at the root reads a keptGNUmakefileormakefile, and its NOTE names that file and what it takes formake bootstrapto run there (#1047) #1121's NOTE says the targets run there once the follow-up merges the two, and only once the file has them, as adopt-project.py, shape_materialize.py and the assembly-root template: a keptGNUmakefile/is a directory GNU make stops at,python3 scripts/bootstrap.pynamespythonon Windows, and the template says what to run wheremakereads another file #1207's directory NOTE now does. - E: "only where that file includes
Makefileor is a link to it". - F: reword it to what NEXT says once all three PRs have landed.
- G: delete
Materialized.follow_ups(), or have it passreads_first, and make the docstring match. - H: in the clone rows where
makereads the shape'sMakefilethroughinclude Makefile, assert that the pinnedAGENTS-shape.mddoes not say "never the shape's Makefile". - I: rewrap both. A template byte change makes every project re-pin, so make the template one together with the next template change.
The local branch fix/1132-template-bootstrap-stacked (9eb5cce0b) is a model of the end state on #1105 + #1121 + main. It was never pushed and never tested, and its words differ from #1207's in places.
Verify
git grep -n 'GNU_MAKE_READS =' -- adopt-project.py scripts/gives one line.git grep -n 'for name in GNU_MAKE_READS'gives only_make_reads_first's lookup and the clause's list.- Rows for shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps a
GNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105's collision line at roots that keepMakefile+GNUmakefile/andMakefile+makefile/: the line says GNU make stops at the directory, andmake -n bootstrapbeside the template'sMakefileexits 2 withIs a directory.. - Rows for adopt-project.py:
execute's NEXT printspython3 scripts/bootstrap.pywhere GNU make at the root reads a keptGNUmakefileormakefile, and its NOTE names that file and what it takes formake bootstrapto run there (#1047) #1121's NOTE and shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps aGNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105's line: each namespythonon Windows, and each NOTE beside a keptMakefilenames the merge. - A row for the link case, measured with
GNUmakefile -> Makefile. - A row that fails under K9.
- Mutants for each, each applied alone and restored with its sha256 checked.
- These pass on git 2.43 and 2.47.1:
tests/test_adopt_make_bootstrap_followups.py,tests/test_adopt_next_make_reads_first.py,tests/test_adopt_collision_make_reads.py,tests/test_pinned_copy_text.py,tests/test_adopt_e2e.pyand the hygiene files.
Lane: openreposhape-5 (openRepoShape-5)
Activity