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

fix: allow go forge to install SHA versions when no tagged versions present #1683

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

Ajpantuso
Copy link
Contributor

Summary

Fixes #1667

Makes it possible to install a go module from SHA when no tagged versions are available.

@endigma
Copy link
Contributor

endigma commented Feb 19, 2024

You should add a unit test for this so when there's a better solution (I hope there will be in the future) it's more clear that it works properly.

@Ajpantuso
Copy link
Contributor Author

You should add a unit test for this so when there's a better solution (I hope there will be in the future) it's more clear that it works properly.

I'm not opposed to adding a test, but I don't think a unit will really capture the intended behavior unless there's an opportunity to mock out some of the go list ... output.

That points me to adding an e2e test, but we'd need to setup an external repo that mocks out this scenario.

So yes I think it makes sense to test this, but think it will add maintenance burden so will wait for input from maintainers.

@Ajpantuso
Copy link
Contributor Author

Actually github.com/jdx/go-example is already used in the test suite so let me add something to e2e.

@Ajpantuso Ajpantuso force-pushed the apantuso/fix_go_forge_zero_version_install branch from d01a5f2 to a7d91bf Compare February 19, 2024 00:39
@endigma
Copy link
Contributor

endigma commented Feb 19, 2024

I meant e2e, unit doesn't work here really. jdx/go-example may not always reproduce the issue, it should be a perpetually tagless module, unless @jdx guarantees that.

@Ajpantuso
Copy link
Contributor Author

I meant e2e, unit doesn't make sense here really. jdx/go-example may not always make sense here, it should be a perpetually tagless module, unless @jdx guarantees that.

Yeah hence the maintenance burden. Probably makes sense to make a public archive out of whatever repo is used.

@jdx jdx merged commit 0958953 into jdx:main Feb 20, 2024
7 checks passed
@Ajpantuso Ajpantuso deleted the apantuso/fix_go_forge_zero_version_install branch February 21, 2024 00:05
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.

mise use go:pkg sometimes fails when go install pkg does not
3 participants