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

Make the go version check better support multi-version go installs #3762

Open
Tracked by #4620
ValarDragon opened this issue Dec 16, 2022 · 3 comments
Open
Tracked by #4620

Comments

@ValarDragon
Copy link
Member

Cref: #3634

This PR breaks all users who have an up-to-date version of go on their build hosts. One can fetch older Go versions and call them as e.g. go1.18 build ..., which would in theory solve the problem here, but it doesn't work because the Makefile doesn't parameterize calls to the go tool.

Quick fix would be

GO ?= go

GO_MAJOR_VERSION = $(shell ${GO} version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1)
GO_MINOR_VERSION = $(shell ${GO} version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)

$(BUILD_TARGETS): check_version go.sum $(BUILDDIR)/
	${GO} $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./...

with equivalent changes (go${GO}) throughout the file.

Originally posted by @08d2 in #3634 (comment)

@ValarDragon
Copy link
Member Author

An alternative is in the build check, to try go1.18 in the install when go is the wrong major version (and otherwise report an error, and tell the user to run go1.18

@08d2
Copy link

08d2 commented Jan 2, 2023

To be clear, these are temporary hacks, and cannot be relied upon. Osmosis must build and run successfully with the latest major version of Go. Whatever prevents that is a bug that must be fixed.

@ValarDragon
Copy link
Member Author

I agree for the sort & compression issues. (The sort should tbh be pretty basic to fix)

If theres FFI issues similar to whats changed in the past, that may genuinely be unavoidable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo 🕒
Development

No branches or pull requests

3 participants