Skip to content

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

Open
NejcS wants to merge 6 commits into
mainfrom
impr/add-standard-template-library
Open

Use standard_template_library/ as a subtree from the plainlang_examples repository#212
NejcS wants to merge 6 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 added 5 commits May 29, 2026 09:29
Preparing to re-add it as a git subtree from the plainlang-examples repository.
The standard_template_library is now a git subtree at the same path, so the path can be resolved directly relative to file_utils.py without importlib.
git-subtree-dir: standard_template_library
git-subtree-split: 14f2c241482f2fbba8e3514759725630f36f85e9
@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
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