Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

Remove unneeded commands/Rename some commands #11

Closed
bufdev opened this issue Apr 10, 2018 · 5 comments
Closed

Remove unneeded commands/Rename some commands #11

bufdev opened this issue Apr 10, 2018 · 5 comments

Comments

@bufdev
Copy link
Contributor

bufdev commented Apr 10, 2018

There's a long list of commands that prototool provides, some of which we probably should not have for v1.0. The full list:

$ prototool help
Usage:
  prototool [command]

Available Commands:
  all                      Compile, then format and overwrite, then re-compile and generate, then lint, stopping if any step fails.
  binary-to-json           Convert the data from json to binary for the message path and data.
  clean                    Delete the cache.
  compile                  Compile with protoc to check for failures.
  descriptor-proto         Get the descriptor proto for the message path.
  download                 Downlond the protobuf artifacts to a cache.
  field-descriptor-proto   Get the field descriptor proto for the field path.
  files                    Print all files that match the input arguments.
  format                   Format a proto file and compile with protoc to check for failures.
  gen                      Generate with protoc.
  grpc                     Call a gRPC endpoint.
  help                     Help about any command
  init                     Generate an initial config file in the current or given directory.
  json-to-binary           Convert the data from json to binary for the message path and data.
  lint                     Lint proto files and compile with protoc to check for failures.
  list-all-lint-groups     List all the available lint groups.
  list-all-linters         List all available linters.
  list-lint-group          List the linters in the given lint group.
  list-linters             List the configurerd linters.
  protoc-commands          Print the commands that would be run on compile or gen.
  service-descriptor-proto Get the service descriptor proto for the service path.
  version                  Print the version.

Things that I would nominate for deletion:

  • binary-to-json: The functionality here is used for gRPC calls, I added this command for testing when developing Prototool, I would prefer we add binary-to-json separately later if needed.
  • json-to-binary: Same.
  • descriptor-proto: Was used for testing, not any obvious use outside of testing.
  • field-descriptor-proto: Same.
  • service-descriptor-proto: Same.

Things I'm not sure of the name of:

  • compile vs gen: The split here isn't super obvious at first glance.
  • format: Maybe fmt?
  • protoc-commands: This is a little weird.
  • download: This also is up for deletion, but I like it for it showing where the cache is.
@fgrosse
Copy link

fgrosse commented May 15, 2018

I want to use prototool in our ci build pipeline. This pipeline runs on a docker
container which has prototool already installed in its image. In order to speed
up my builds I want to use prototool download to download the protoc version
we will most likely be using in the CI environment later into the builder image.

Thus I think prototool download should stay and may even be extended so its
possible to specify which protoc version to download without having a
prototool.yml file yet (that's something for another ticket though).

Any thoughts on this use case?

@bufdev
Copy link
Contributor Author

bufdev commented May 15, 2018

This already exists with the —protoc-url flag.

@fgrosse
Copy link

fgrosse commented May 15, 2018

Good point, I will try my luck then with --protoc-url. However I hope you keep the download command for this use case. :)

download: This also is up for deletion, but I like it for it showing where the cache is.

@bufdev
Copy link
Contributor Author

bufdev commented Jul 11, 2018

@fgrosse how big of an issue would it be if download was not there? The download should be pretty quick, on the order of seconds, so if done implicitly with compile/gen/format/lint/all, is it a problem?

@bufdev
Copy link
Contributor Author

bufdev commented Jul 11, 2018

Closing this issue as everything here is done except the download issue - @fgrosse comment on #144 with any thoughts.

@bufdev bufdev closed this as completed Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants