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

Use tools/go/packages in place of go/build #486

Merged
merged 3 commits into from
Oct 27, 2021

Conversation

benmoss
Copy link
Contributor

@benmoss benmoss commented Oct 21, 2021

Fixes #305

Turned out to be easier than I thought, assuming I understand anything 😸

@google-cla google-cla bot added the cla: yes label Oct 21, 2021
@@ -222,7 +200,7 @@ func TestGoBuildIsSupportedRefWithModules(t *testing.T) {
for _, importpath := range []string{
"ko://github.com/google/ko/pkg/build", // not a command.
"ko://github.com/google/ko/pkg/nonexistent", // does not exist.
"ko://github.com/google/ko", // not in this module.
"ko://github.com/google/go-github", // not in this module.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really sure about this, we're not mocking the module anymore and so ko://github.com/google/ko is buildable

@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2021

Codecov Report

Merging #486 (eb3e456) into main (dde6c6d) will decrease coverage by 0.75%.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #486      +/-   ##
==========================================
- Coverage   53.11%   52.35%   -0.76%     
==========================================
  Files          36       36              
  Lines        1847     1801      -46     
==========================================
- Hits          981      943      -38     
+ Misses        715      710       -5     
+ Partials      151      148       -3     
Impacted Files Coverage Δ
pkg/build/options.go 65.38% <ø> (-6.50%) ⬇️
pkg/build/gobuild.go 56.29% <42.85%> (-2.15%) ⬇️
pkg/commands/publish.go
pkg/commands/build.go 68.75% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dde6c6d...eb3e456. Read the comment docs.

@benmoss benmoss force-pushed the go-builder-packages branch from 9de1e1c to eb3e456 Compare October 21, 2021 19:39
imjasonh
imjasonh previously approved these changes Oct 22, 2021
Copy link
Collaborator

@halvards halvards left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @benmoss! I've added a few comments regarding working directories.

pkg/build/gobuild.go Outdated Show resolved Hide resolved
pkg/build/gobuild.go Outdated Show resolved Hide resolved
pkg/build/gobuild.go Outdated Show resolved Hide resolved
Signed-off-by: Ben Moss <benm@vmware.com>
@imjasonh imjasonh merged commit 5d7673e into ko-build:main Oct 27, 2021
@benmoss benmoss deleted the go-builder-packages branch October 27, 2021 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor go builder to stop using go/build
4 participants