Repository navigation
Conversation
…s shape too The single `work-dir paths` replacement is right for the block upstream has today. seedds/nxnative LNPANDY#278 (open, stacked on LNPANDY#275) rewrites that block: out_ipa moves under `if want_ios:` with four more spaces of indentation, the mac_pack check becomes an out_app block, and the `work` assignment stays last. The anchor would not match on the first sync after that lands. The patch now picks the shape: with `out_ipa = None` + `if want_ios:` it deletes the trailing assignment, inserts `work` above that pair (the assignment reads args.work_dir) and rewrites the 8-space out_ipa line; otherwise it replaces the four-line block exactly as before. Checked by applying patch_nsp() to both upstream/main and the LNPANDY#278 branch: the pre-LNPANDY#278 output's block is byte-identical to this tree's, and the post-LNPANDY#278 output compiles, keeps `work` above `out_ipa`, and keeps the out_app block.
|
Verified end to end before #278 lands, using the fork's own sync:
So the day #278 merges, the daily sync produces a tree that builds — not just one that parses. |
…rom PR #17) Upstream #278 (open, --platform takes a list) rewrites the out_ipa block: out_ipa moves under 'if want_ios:' indented 8 spaces, the mac_pack check becomes an out_app block, and `work` stays last. Our single anchor was written for today's shape and would have stopped matching on the first sync after #278 lands. JMRBDev's PR #17 detected that and proposed the shape split; this is that idea with one change — each shape is a single (old, new) pair instead of a delete plus an insert. His version removed the `work` line first and re-inserted it, so a future anchor drift between the two steps would have left the tree without the assignment. Verified by applying patch_nsp() to both shapes (upstream/main and a hand-built #278 fixture): work is assigned before out_ipa in both, and the pre-#278 output is byte-identical to the tree. Credit: PR #17.
|
Adopted as 73a986a — thank you, this is exactly the right kind of forward-looking patch, and the reasoning about when it breaks is what makes it worth taking now. I verified your analysis against the real thing: pulled #278's diff and confirmed One change I made: your #278 branch deletes the (" work = nsp_dir / f'{g.id}_build'\n", ""), # step 1: remove
(..., work_line + "\n out_ipa = None\n if want_ios:\n"), # step 2: put backIf step 2 ever stops matching while step 1 still applies, the tree ends up with no Verified on both: pre-#278 output is byte-identical to this tree, post-#278 gives Also worth noting: #278 is what PR #16 needs — the |
Follow-up to #15, which
baf9647superseded for the tree itself.Your single
work-dir pathsreplacement is right for the block upstream has today.seedds/nxnative#278 (open, stacked on #275) rewrites that block:out_ipamoves underif want_ios:and is indented four more spaces,mac_packcheck becomes anout_appblock,workassignment stays last.The anchor would not match on the first sync after #278 lands, so this makes the patch pick the shape:
out_ipa = None+if want_ios:— delete the trailingworkassignment, insert it above that pair, and rewrite the 8-spaceout_ipaline towork.parent;Checked by applying
patch_nsp()to both files:upstream/main): the resulting block is byte-identical to this tree's block (pre block equals tree: True);workaboveout_ipa,out_appblock intact.It is inert until #278 lands, and keeps the daily sync alive when it does. Merge it whenever; no order against #16.