Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Considering a repo compatibility strategy #9

Open
jaraco opened this issue Jun 5, 2024 · 1 comment
Open

Considering a repo compatibility strategy #9

jaraco opened this issue Jun 5, 2024 · 1 comment

Comments

@jaraco
Copy link
Member

jaraco commented Jun 5, 2024

It occurred to me that despite the design of the essential layout, it might be possible to provide a compatible view of the repo that mimics the flat layout (or maybe the src layout) by leveraging subrepos (i.e. Git submodules).

And it makes me wonder, can a repo have a submodule into itself? I'm imagining something like:

In the main branch, store the code in the essential layout. In another branch, which I've yet to name, but maybe full or merged, it would have all of the ancillary details manifest (perhaps by tooling) and then link to the code in a src layout or flat layout:

 tempora merged @ tree
.
├── LICENSE
├── NEWS.rst
├── ...
├── pyproject.toml
├── pytest.ini
├── ruff.toml
├── tempora -> https://github.com/jaraco/tempora@main
├── towncrier.toml
└── tox.ini

This approach could provide a compatibility layer and branch where the ancillary details could be statically manifest for tools that require them (such as pip install from repo).

@jaraco
Copy link
Member Author

jaraco commented Jun 5, 2024

See https://github.com/jaraco/tempora/tree/experiment/full for an example, which I created by running the commands:

$ git checkout -b experiment/full
$ git rm -r docs tempora tests
$ git commit ...
$ git submodule add --force --branch experiment/coherent gh://jaraco/tempora
$ git commit ...

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

No branches or pull requests

1 participant