-
Notifications
You must be signed in to change notification settings - Fork 345
Promote cmd out of internal #217
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #217 +/- ##
=========================================
- Coverage 68.84% 63.24% -5.6%
=========================================
Files 73 74 +1
Lines 3733 4201 +468
=========================================
+ Hits 2570 2657 +87
- Misses 840 1207 +367
- Partials 323 337 +14
Continue to review full report at Codecov.
|
CHANGELOG.md
Outdated
@@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | |||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | |||
|
|||
## [Unreleased] | |||
- No changes yet. | |||
- Move `internal/cmd` to `cmd/` so that it can be depended on. |
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.
### Changed
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.
Good catch - using Added
since this is more additive from a user perspective. Changed
is a change in behavior and sometimes implies a breaking change.
option go_package = "batpb"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "BazProto"; | ||
option java_package = "com.bat"; |
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.
missing new lines at the end of these proto files
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.
Second thought, why are we introducing these files?
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.
Oof, I forgot to update the .gitignore
in my project-wide find/replace. Fixed 👍
@@ -5,7 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | |||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | |||
|
|||
## [Unreleased] | |||
- No changes yet. | |||
### Added | |||
- Move `internal/cmd` to `cmd/` so that it can be depended on. |
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.
super nitty:
Move `internal/cmd` to `cmd/` so that `prototool` can be imported by other projects.
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.
I think I'm missing something - this PR doesn't change that prototool
can not be used properly with go get
. By doing this, we're allowing what we did not want to allow. Additionally, the commands gen-prototool-bash-completion, gen-prototool-zsh-completion, gen-prototool-manpages
should never be public, these are just helpers for the release.
I'm probably missing something though, should we talk offline?
@peter-edge Sorry, the description wasn't clear - you're not missing anything. We still can't use
I was attempting to solve the version control issue (i.e. the What are your thoughts? Next steps would be to include a |
My general thoughts:
|
Also note I started doing the conversion in #197, however there's a bunch of issues to doing this properly, most notably that you will want a build tag for testing dependencies, and especially for tool dependencies. See golang/go#24661 to get started. Also see golang/go#25922. |
Sweet, that sounds reasonable. Thanks for the links! Let's give this a look and make sure everything is in place before we move this forward. I'm happy to defer / close this for now and re-open when it is relevant. |
In response to #192, this moves the
./internal/cmd
package to./cmd
so that it more clearly expresses the project's usability withgo get
when we introduce ago.mod
file.Note that this also allows projects to effectively version control
prototool
.For example, in dependency management systems like
glide
, we can add the following lines to theglide.yaml
:However,
glide
will not pick up the transitive dependencies forprototool
by default unless the package is actually depended on. Now thatcmd
is out ofinternal/
, we can add a simple import like so: