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 ignore requirements defined on go_repo #229

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tools/please_go/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Version 1.10.2
-------------
* Fix regression in 1.10.0 where module requirements passed in through `go_repo` were
ignored.

Version 1.10.1
--------------
* .a files in the directory of a Go package in a go_repo are now attached as dependencies
Expand Down
2 changes: 1 addition & 1 deletion tools/please_go/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.1
1.10.2
5 changes: 4 additions & 1 deletion tools/please_go/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ func (g *Generate) Generate() error {
if err != nil {
return err
}
g.moduleDeps = append(deps, g.moduleName)
// It's important to not override g.moduleDeps as it can already contains dependencies configured
// when `Generate` was constructed.
g.moduleDeps = append(g.moduleDeps, deps...)
g.moduleDeps = append(g.moduleDeps, g.moduleName)
g.replace = replacements

if err := g.writeConfig(); err != nil {
Expand Down
Loading