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

Removes bingo for go run #350

Merged
merged 6 commits into from
Aug 24, 2021
Merged

Removes bingo for go run #350

merged 6 commits into from
Aug 24, 2021

Conversation

codefromthecrypt
Copy link
Contributor

This uses versioned syntax of go run brought to us in 1.17
https://golang.org/doc/go1.17

In doing so, we can remove the complexity of bingo and also simplify its
impact on windows.

Fixes #314

This uses versioned syntax of `go run` brought to us in 1.17
https://golang.org/doc/go1.17

In doing so, we can remove the complexity of bingo and also simplify its
impact on windows.

Fixes #314

Signed-off-by: Adrian Cole <[email protected]>
@@ -72,9 +72,8 @@ jobs:
with:
path: | # TODO: go build cache if we care, noting it is OS-specific
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will sort out the build cache in a different PR as it requires handling Os-specifics!

Signed-off-by: Adrian Cole <[email protected]>
Copy link
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 😄

@codefromthecrypt
Copy link
Contributor Author

might have a glitch on goreleaser on windows. regardless will be green prior to merge!

± |no-bingo {1} ✓| → make clean msi
--- clean ---
--- win-bin ---
GOOS=windows GOARCH=amd64 go run github.com/goreleaser/[email protected] build --snapshot --single-target --rm-dist
fork/exec /var/folders/vd/1cf8zdb1721f4z5rjggy8bp40000gn/T/go-build2241750511/b001/exe/goreleaser.exe: exec format error
make: *** [dist/func-e_windows_amd64/func-e.exe] Error 1

Adrian Cole added 2 commits August 24, 2021 13:08
Signed-off-by: Adrian Cole <[email protected]>
Signed-off-by: Adrian Cole <[email protected]>
@codefromthecrypt
Copy link
Contributor Author

note: this is slower than before because go rebuilds each time. However, this time spent is less important to me than lack of cruft, so think it is a better tradeoff. @mathetake wdyt?

@for f in `find . -name '*.go'`; do \
awk '/^import \($$/,/^\)$$/{if($$0=="")next}{print}' $$f > /tmp/fmt; \
mv /tmp/fmt $$f; \
$(GOIMPORTS) -w -local github.com/tetratelabs/func-e $$f; \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doing this in a loop is as time consuming as trying to parse wtf ^^ was trying to do

Makefile Outdated
@echo "--- win-bin ---"
@GOOS=windows GOARCH=amd64 $(GORELEASER) build --snapshot --single-target --rm-dist
# We can't pass GOOS=windows GOARCH=amd64 as it ends up interpreted by go, not goreleaser.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is annoying to build all when you only need windows, but I think we will be killing goreleaser soon anyway

Signed-off-by: Adrian Cole <[email protected]>
Makefile Outdated Show resolved Hide resolved
Co-authored-by: Takeshi Yoneda <[email protected]>
@codefromthecrypt codefromthecrypt merged commit 877a72e into master Aug 24, 2021
@codefromthecrypt codefromthecrypt deleted the no-bingo branch August 24, 2021 06:08
@codefromthecrypt
Copy link
Contributor Author

thanks takeshi-san!

codefromthecrypt pushed a commit that referenced this pull request Aug 29, 2021
This will be used in the new release process to generate draft release
notes that a person edits before clicking publish.

Notably, this correctly annotates co-authors, which is a common practice
in func-e, but easy to miss.

Ex. (nevermind the 'aster' as I'm hacking this to show pending notes)
```bash
$ .github/workflows/release_notes.sh master
```

---

func-e aster supports X and Y and notably fixes Z

TODO: classify the below into up to 4 major headings and the rest as bulleted items in minor changes

---
ee700a1 Converts e2e to new Makefile (#356) Adrian Cole, Co-authored-by: Dhi Aurrahman <[email protected]>

83e7c30 updates last known Envoy to 1.19.1 (#355) Adrian Cole,
f975609 Aligns make to func-e color scheme (#354) Adrian Cole,
551840f Scaffold a new Makefile (#353) Adrian Cole,
877a72e Removes bingo for `go run` (#350) Adrian Cole, Co-authored-by: Takeshi Yoneda <[email protected]>

12a74b1 Adds vanity downloads (#351) Adrian Cole,
0f313c8 Pares down code to work around flake (#349) Adrian Cole,
e74c0b7 Removes test utilities for built-ins (#347) Adrian Cole,
41c2742 Cleans up tests (#348) Adrian Cole,
17375b4 Updates to Go 1.17 (#346) Adrian Cole,
6ae5d48 Corrects manifest path Adrian Cole,
a9ccc4d fixes auth Adrian Cole,
a4bc290 Fixes glitches in package update script (#344) Adrian Cole,
---

Don't forget to cite who was involved and why

nothing trivial please!

func-e aster was possible thanks to the following contributors:

Adrian Cole
Dhi Aurrahman
Takeshi Yoneda

Signed-off-by: Adrian Cole <[email protected]>
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.

replace bingo with go 1.17 go run commands
2 participants