stellar / rs-soroban-env

Rust environment for Soroban contracts.
Apache License 2.0
60 stars 40 forks source link

Release 20.0.2 not part of any branch, can't see tag locally. #1325

Closed brson closed 7 months ago

brson commented 7 months ago

In the long term this is probably not going to matter, but it caused me a bit of headache today, needing to debug release 20.0.2 specifically.

After fetching from the repo and running git tag I don't see v20.0.2 listed because the commit used for that release is not part of any branch. It was in this PR: https://github.com/stellar/rs-soroban-env/pull/1307, which was not merged.

I was able to get that commit by running

git fetch origin 81f6eb1eefd299af3e03fa0db7b20eb355b2b55f

after which I could see that tag and check it out.

brson commented 7 months ago

I would understand if this is a wontfix.

leighmcculloch commented 7 months ago

It was released by forking off a past tag, which is why there isn’t a long lived branch connected to it. I guess we could keep release branches around and protect them so they can’t be rewritten. My only concern with that is it increases the maintenance burden of maintaining the repos. For the long lived branch to be meaningfully safe we’d need to enable branch protection for it which means remembering to set that up. Internally that means involving someone with elevated access.

I feel on some level of principle this shouldn’t matter given that the commit is tagged and it isn’t orphaned. I guess the git developers don’t agree because by default git doesn’t fetch all tags when cloning.

Instead of the fetch command above you can also use:

git fetch --tags

Any git operations involving tag discovery need to be proceeded by that I think.

brson commented 7 months ago

Thanks for the explanation.

I think this is just user error. I did a fresh clone and did get this tag.

Sorry for the noise.