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

Retract incorrectly tagged out-of-order version (v1.2.3) #398

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

jordanschalm
Copy link
Member

@jordanschalm jordanschalm commented Dec 5, 2023

Context

A few months ago an out-of-order semver tag was pushed (v1.2.3). The tag was removed from the repository, however, since it was depended on by another Go module before being removed, we also need to explicitly mark the version as retracted to fully correct the Go tooling's behaviour.

Why is this a problem

  • Requesting modules @latest will return version v1.2.3 rather than the actual most recent version
  • Upgrading modules (eg. go get -u ...) will "upgrade" the core-contracts modules to v1.2.3
  • If a module and its dependencies require multiple different versions of a core-contracts module, one of which is v1.2.3 (or any untagged commit after v1.2.3), then Go will build with v1.2.3 rather than the actual most recent version

How this fixes the problem

This PR marks the incorrectly tagged version as retracted, which means go tooling will no longer consider it the latest version (and won't attempt to automatically upgrade to it).

In addition, once this is merged, we will need to tag v1.2.4:

  • this creates a new largest semver version, which go will consider as latest
  • go tooling will download this v1.2.4 version, read the retract statements, then correctly interpret the true latest version to be v0.X.Y

This is needed because once a version is added to the sum.golang.org database, it is never removed (prioritizing build stability). See https://go.dev/ref/mod#checksum-database, which this change is based off, for more details.

This marks the incorrectly tagged version as retracted, which means go
tooling will no longer consider it the latest version (and won't attempt
to automatically upgrade to it).

In addition, once this is merged, we will need to tag v1.2.4:
- this creates a new largest semver version, which go will consider as
  latest
- go tooling will download this v1.2.4 version, read the retract
  statements, then correctly interpret the true latest version to be
  v0.X.Y

This is needed because once a version is added to the sum.golang.org
database, it is never removed (prioritizing build stability). See
https://go.dev/ref/mod#checksum-database, which this change is based
off, for more details.
@jordanschalm jordanschalm changed the title Retract incorrectly tagged out-of-order versions (v1.2.3) Retract incorrectly tagged out-of-order version (v1.2.3) Dec 5, 2023
@jordanschalm jordanschalm merged commit c11c935 into master Dec 6, 2023
2 checks passed
@jordanschalm
Copy link
Member Author

Tagged v1.2.4 and looks to be working now 🎉

% go get github.com/onflow/flow-core-contracts/lib/go/contracts@v1.2.4
go: warning: github.com/onflow/flow-core-contracts/lib/go/contracts@v1.2.4: retracted by module author: contains retraction only
go: to switch to the latest unretracted version, run:
	go get github.com/onflow/flow-core-contracts/lib/go/contracts@latest
 % go get github.com/onflow/flow-core-contracts/lib/go/contracts@latest
go: downgraded github.com/onflow/flow-core-contracts/lib/go/contracts v1.2.4 => v0.15.0

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.

3 participants