-
Notifications
You must be signed in to change notification settings - Fork 305
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
Make go.thethings.network/lorawan-stack/v3/cmd a module #2495
Conversation
ceda264
to
54123b2
Compare
Blocked by #2496 |
54123b2
to
f764ad1
Compare
In order to use versioned tools, I would suggest;
Example Makefile ( GO = go
GOBIN = $(PWD)/.bin
export GOBIN
.PHONY: deps.dev
deps.dev:
@cat main.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % $(GO) install % And then shell exec tools like |
Coverage decreased (-0.002%) to 73.122% when pulling 49d17a60ceb38cdfac73fefe5190f5430d656ccd on feature/cmd-mod into c637d93 on master. |
f764ad1
to
49d17a6
Compare
49d17a6
to
f8b82ef
Compare
03eab01
to
1b308c3
Compare
1b308c3
to
27142c1
Compare
$(MAGE): magefile.go $(wildcard .mage/*.go) | ||
GO111MODULE=on go install github.com/magefile/mage | ||
GO111MODULE=on go run github.com/magefile/mage -compile $(MAGE) | ||
$(GOBIN): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we turn this into $(GOBIN): tools/go.mod
for it to track that file for changes to the tools and versions?
@@ -14,7 +14,7 @@ | |||
|
|||
// +build tools | |||
|
|||
package tools | |||
package main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
The benefit of using |
Yes, that definitely has benefits. But I do want to keep those modules (and replacements) out of the project root's
|
I'd vote for To clarify, that means running |
OK, please try if that works. |
Looking at replacements we have in this changeset;
|
Summary
Replaces #2493
Make
go.thethings.network/lorawan-stack/v3/cmd
a moduleChanges
tools.go
into newtools
modcmd
a module.bin
instead ofgo run
which would use the repo's moduleNotes for Reviewers
/go.mod
and/cmd/go.mod
/cmd/tools.go
. I'm also open to a/tools
module.bin
binaries if modules update intools/go.mod
; maybe always install onmake init
?Checklist
README.md
. The target branch is set tomaster
if the changes are fully compatible with existing API, database, configuration and CLI.CHANGELOG.md
.CONTRIBUTING.md
, there are no fixup commits left.