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

Don't add go_binary to install filegroup for go_repo #184

Merged
merged 5 commits into from
Nov 22, 2023

Conversation

Tatskaari
Copy link
Contributor

No description provided.

@Tatskaari Tatskaari force-pushed the go-repo-install-binary branch from f395393 to 445ebba Compare November 20, 2023 17:54
@Tatskaari Tatskaari force-pushed the go-repo-install-binary branch from 445ebba to 322b230 Compare November 20, 2023 17:56
Copy link
Contributor

@samwestmoreland samwestmoreland left a comment

Choose a reason for hiding this comment

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

Nice!

tools/please_go/generate/generate.go Outdated Show resolved Hide resolved
@@ -483,8 +498,21 @@ func trimPath(target, base string) string {

// libTargetForPleasePackage returns the build label for the go_library() target that would be generated for a package
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment needs updating as well

return "", err
}

libs := append(file.Rules("go_library"), file.Rules("cgo_library")...)
Copy link
Contributor

Choose a reason for hiding this comment

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

So what does it mean here if len(libs) is greater than 1? (and should we be handling it?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can't be unless there's a bug in the rest of the code. We just generated this build file. Maybe I can add a check to assert that.

@Tatskaari Tatskaari merged commit ee6ac1c into please-build:master Nov 22, 2023
4 checks passed
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.

2 participants