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

Add support for gotip and latest #34

Closed
wants to merge 8 commits into from
Closed

Add support for gotip and latest #34

wants to merge 8 commits into from

Conversation

tie
Copy link

@tie tie commented Dec 15, 2019

This PR adds support for building Go tip from source and an alias latest for the major release.

Closes #21
Closes #31
Closes #32
Closes #35

@tie
Copy link
Author

tie commented Dec 15, 2019

/cc @zikaeroh

@tie
Copy link
Author

tie commented Dec 15, 2019

Ubuntu tests are passing, getting errors on Windows.

https://github.com/tie/setup-go/runs/349414830

Edit: seems related https://stackoverflow.com/a/37996249

@tie
Copy link
Author

tie commented Dec 15, 2019

Aside from Windows errors, the code is working. Opening for review.

@tie tie marked this pull request as ready for review December 15, 2019 14:20
src/installer.ts Outdated Show resolved Hide resolved
src/installer.ts Outdated Show resolved Hide resolved
src/installer.ts Outdated Show resolved Hide resolved
src/installer.ts Outdated Show resolved Hide resolved
src/installer.ts Outdated Show resolved Hide resolved
@zikaeroh
Copy link

I left some comments, but I'm still pretty iffy on the magic of using an API to fetch the commit, grabbing an archive, and creating a VERSION file, given how far it is from an actual build that people working with tip actually do.

The main use case of running tip in CI is to find issues ahead of time, be it on Go itself or in user code. For example, I found broken unsafe code in one of my dependencies because I ran race tests with tip, which enabled checkptr and revealed the issue.

Being too far removed from the version output expected by the Go devs, or the install process in the documentation I think may not be a good idea. I'd really consider another method where a plain git clone --depth=1 ... is used.

@tie
Copy link
Author

tie commented Dec 15, 2019

I’ve reconsidered my decision on using archives.

Plain git downloads around 138M, while the archive size is 21M (compressed) and 113M (extracted). The difference is negligible. Also, using git should fix issues with Windows.

We could cache .git separately and do git pull --depth=1 for updates, which should be overall faster than downloading archive each time.

src/installer.ts Outdated Show resolved Hide resolved
@tie tie changed the title Add support gotip Add support for gotip Dec 16, 2019
@tie
Copy link
Author

tie commented Dec 16, 2019

Almost there on another branch, having a problem with lint/prettifier being not helpful at all (it just fails and tells to read the log file for details).

@tie
Copy link
Author

tie commented Dec 18, 2019

Also closes #35 because I ended up refactoring tests and found this issue.

@tie
Copy link
Author

tie commented Dec 18, 2019

Ready for review again.

/cc @zikaeroh I hope I’ve addressed your concerns.

Last CI run: https://github.com/tie/setup-go/commit/8d6c88b10d1e37b1bffe029bd5e441eacf067633/checks

@tie tie changed the title Add support for gotip Add support for gotip and latest Dec 18, 2019
@bryanmacfarlane
Copy link
Member

Interested in these features potentially but master changed drastically with the v2-beta changes. Do you want to take a stab at implementing on top of that code?

@bryanmacfarlane
Copy link
Member

Looking over this soon. assigning to me

@wyk9787
Copy link

wyk9787 commented Jun 4, 2020

Is there an estimated timeline when this will be implemented? This will be really helpful for us to transit into using Github Action.

@tie
Copy link
Author

tie commented Jul 21, 2021

Closing this PR since it’s out-of-date.

@tie tie closed this Jul 21, 2021
@tie tie deleted the gotip branch July 21, 2021 08:09
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.

Broken version normalization Use the latest release Support tip?
4 participants