Skip to content

Use standard_template_library/ as a subtree from the plainlang_examples repository#212

Merged
NejcS merged 3 commits into
mainfrom
impr/add-standard-template-library
Jun 30, 2026
Merged

Use standard_template_library/ as a subtree from the plainlang_examples repository#212
NejcS merged 3 commits into
mainfrom
impr/add-standard-template-library

Conversation

@NejcS

@NejcS NejcS commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

The standard_template_library/ is now a git subtree from the plainlang_examples repo. This PR does two things on top of that:

  1. Converts the directory into a git subtree — It embeds the git-subtree-split metadata in the commit history using git subtree. This is what enables future syncing with git subtree pull when plainlang-examples updates the templates. Note that this needs to be done manually anytime the templates change in that repository.

  2. Fixes plain2code.py — replaces the importlib.resources path with a plain string, so the subtree directory is resolved correctly relative to plain2code.py at runtime.

The file diff appears empty because the standard template files' contents are unchanged — only the git history wiring is new.

Also fixes pre-existing date-sensitive test failures in test_cli_output.py (hardcoded 2026-06-01 dates moved to 2028-12-01).

Test plan

  • --dry-run passes for hello-world-python.plain, hello-world-golang.plain, and hello-world-react.plain (all import from the standard template library)
  • All 149 unit tests pass (pytest tests/)
  • test by doing a build and run the local build on a project that imports things from the library
  • git subtree pull works after a future update to plainlang-examples

Closes https://github.com/Codeplain-ai/next-microsoft/issues/33

@NejcS NejcS force-pushed the impr/add-standard-template-library branch from 4dbc302 to 05846cc Compare June 1, 2026 10:48
@NejcS NejcS marked this pull request as ready for review June 1, 2026 11:43
@NejcS NejcS self-assigned this Jun 1, 2026
@NejcS NejcS requested a review from zanjonke June 1, 2026 11:43
@NejcS

NejcS commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Matching PR in the plainlang-examples repo: Codeplain-ai/plainlang-examples#19

@zanjonke I'd like to test if this will work for the shipped project like what clients will install from PyPI. Any suggestions how to test that locally?

@NejcS NejcS changed the title Add standard template library Use standard_template_library/ as a subtree from the plainlang_examples repository Jun 2, 2026
@NejcS NejcS force-pushed the impr/add-standard-template-library branch from d9c0021 to aa33727 Compare June 12, 2026 07:43
@NejcS NejcS force-pushed the impr/add-standard-template-library branch from aa33727 to d70dcd1 Compare June 29, 2026 12:56
NejcS added 3 commits June 29, 2026 15:09
Removes the inline copy of standard_template_library/ so it can be re-added as a git subtree from the plainlang-examples repository. Also drops the now-unnecessary importlib.resources lookup in plain2code.py and documents the subtree sync workflow in CLAUDE.md.
git-subtree-dir: standard_template_library
git-subtree-split: 14f2c241482f2fbba8e3514759725630f36f85e9
@NejcS NejcS force-pushed the impr/add-standard-template-library branch from d70dcd1 to 9ab217f Compare June 29, 2026 13:10
@NejcS NejcS merged commit 6425312 into main Jun 30, 2026
10 checks passed
@NejcS NejcS deleted the impr/add-standard-template-library branch June 30, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant