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

Why aren't these repositories simply tags? #3

Open
PMunch opened this issue Aug 4, 2023 · 4 comments
Open

Why aren't these repositories simply tags? #3

PMunch opened this issue Aug 4, 2023 · 4 comments

Comments

@PMunch
Copy link

PMunch commented Aug 4, 2023

I maintain the script which builds docker containers of Nim given a version number. It would be much easier to grab the correct version of csources if they where simply kept in a single repository and tagged with which version to use for each Nim version. So e.g. there would be a series of tags for the v1 series pointing to the csources_v1 code, and now a new tag for the v2.0.0 release pointing to a commit with this code. Then to build version X of Nim it would be as simple as grabbing the csources repository at the tag X. The current system is prone to breaking and I constantly have to modify to keep up with various inconsistencies..

@Araq
Copy link
Member

Araq commented Aug 5, 2023

The logic has been automated in the atlas env command.

@PMunch
Copy link
Author

PMunch commented Aug 5, 2023

Okay, that's no reason to not make the system easier though. I don't really see the drawback of keeping separate versions and tag them over having to implement the logic in every tool.

@Araq
Copy link
Member

Araq commented Aug 8, 2023

Well any other solution would need to be automated too and the logic would hardly be any simpler. Tagging here is fundamentally flawed as it means:

  1. More frequent pushes to csources are required. But we release Nim versions more often than we release csources.
  2. csources is supposed to be stable. git clone csources should not mean "give me the latest version", it should mean "give me something that doesn't change".

And while it means work for you to support later Nim versions it also means the previous versions keep working for good.

@PMunch
Copy link
Author

PMunch commented Aug 8, 2023

I think we might be talking about different things. I'm not saying that the csources should be built for every Nim version. The csources should exists exactly as they do today, but just stay within one repository. Then each version only add a new tag in the Git repository pointing to the same commit. This means that if I want to build version 1.6.14 for example I simply clone with git clone --depth 1 --branch v1.6.14 https://github.com/nim-lang/csources. Since Git now has a tag v1.6.14 which points to the commit that contains what is now csources_v1 it will grab the correct version. For version 2.0.0 simply take the code which now lives in the csources_v2 repo, add it to the csources repo (alternatively as its own branch) and tag the commit with v2.0.0. The command to clone the csources for v2.0.0 is now git clone --depth 1 --branch v2.0.0 https://github.com/nim-lang/csources. The only thing which changes in this case is the tag name, and the repo still only contains one commit per major revision of the csources. So when Nim v2.0.2 rolls around you don't any new commits to the csources repo, you simply add a v2.0.2 tag to the same commit as the one the v2.0.0 tag points to. It's the same system for csources which is used today, just much easier to grab the right version from a script.

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

2 participants