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

Bug: bin does not present the binary for github.com/protocolbuffers/protobuf #103

Closed
breml opened this issue Jun 17, 2021 · 3 comments · Fixed by #104
Closed

Bug: bin does not present the binary for github.com/protocolbuffers/protobuf #103

breml opened this issue Jun 17, 2021 · 3 comments · Fixed by #104

Comments

@breml
Copy link
Collaborator

breml commented Jun 17, 2021

With bin 0.7.0, on linux (64 bit), install github.com/protocolbuffers/protobuf like this:

$ bin install github.com/protocolbuffers/protobuf
   • Getting latest release for protocolbuffers/protobuf
   • Starting download of https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-linux-x86_64.zip
1.60 MiB / 1.60 MiB [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 928.05 MiB p/s 0s

Multiple matches found, please select one:

 [1] include/google/protobuf/any.proto
 [2] include/google/protobuf/field_mask.proto
 [3] include/google/protobuf/empty.proto
 [4] include/google/protobuf/descriptor.proto
 [5] include/google/protobuf/compiler/plugin.proto
 [6] include/google/protobuf/api.proto
 [7] include/google/protobuf/struct.proto
 [8] include/google/protobuf/type.proto
 [9] include/google/protobuf/timestamp.proto
 [10] include/google/protobuf/compiler/
 [11] include/google/protobuf/source_context.proto
 [12] include/google/protobuf/
 [13] include/google/protobuf/wrappers.proto
 [14] include/google/protobuf/duration.proto
 Select an option:

The correct archive (protoc-3.17.3-linux-x86_64.zip) is selected, but the actual binary file (bin/protoc) is not presented for installation.

@sirlatrom
Copy link
Collaborator

@breml Can you run it again, but with --debug?

@marcosnils
Copy link
Owner

Seems like a clear bug in bin that's not walking through the /bin folder in the zip file

 bin install --debug github.com/protocolbuffers/protobuf
   • debug logs enabled
   • Config directory is: /home/marcos/.bin
   • Download path set to /home/marcos/bin
   • Getting latest release for protocolbuffers/protobuf
   • Removing protoc-3.17.3-win64.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-win64.zip) with score 5 lower than 20
   • Removing protoc-3.17.3-osx-x86_64.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-osx-x86_64.zip) with score 10 lower than 20
   • Keeping protoc-3.17.3-linux-x86_64.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-linux-x86_64.zip) with highest score 20
   • Removing protoc-3.17.3-linux-x86_32.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-linux-x86_32.zip) with score 10 lower than 20
   • Removing protoc-3.17.3-linux-s390_64.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-linux-s390_64.zip) with score 15 lower than 20
   • Removing protoc-3.17.3-linux-ppcle_64.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-linux-ppcle_64.zip) with score 15 lower than 20
   • Removing protoc-3.17.3-linux-aarch_64.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-linux-aarch_64.zip) with score 15 lower than 20
   • Removing protobuf-ruby-3.17.3.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-ruby-3.17.3.zip) with score 1 lower than 20
   • Removing protobuf-ruby-3.17.3.tar.gz (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-ruby-3.17.3.tar.gz) with score 1 lower than 20
   • Removing protobuf-python-3.17.3.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-python-3.17.3.zip) with score 1 lower than 20
   • Removing protobuf-python-3.17.3.tar.gz (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-python-3.17.3.tar.gz) with score 1 lower than 20
   • Removing protobuf-php-3.17.3.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-php-3.17.3.zip) with score 1 lower than 20
   • Removing protobuf-php-3.17.3.tar.gz (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-php-3.17.3.tar.gz) with score 1 lower than 20
   • Removing protobuf-objectivec-3.17.3.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-objectivec-3.17.3.zip) with score 1 lower than 20
   • Removing protobuf-objectivec-3.17.3.tar.gz (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-objectivec-3.17.3.tar.gz) with score 1 lower than 20
   • Removing protobuf-js-3.17.3.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-js-3.17.3.zip) with score 1 lower than 20
   • Removing protobuf-js-3.17.3.tar.gz (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-js-3.17.3.tar.gz) with score 1 lower than 20
   • Removing protobuf-java-3.17.3.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-java-3.17.3.zip) with score 1 lower than 20
   • Removing protobuf-java-3.17.3.tar.gz (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-java-3.17.3.tar.gz) with score 1 lower than 20
   • Removing protobuf-csharp-3.17.3.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-csharp-3.17.3.zip) with score 1 lower than 20
   • Removing protobuf-csharp-3.17.3.tar.gz (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-csharp-3.17.3.tar.gz) with score 1 lower than 20
   • Removing protobuf-cpp-3.17.3.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-cpp-3.17.3.zip) with score 1 lower than 20
   • Removing protobuf-cpp-3.17.3.tar.gz (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-cpp-3.17.3.tar.gz) with score 1 lower than 20
   • Removing protobuf-all-3.17.3.zip (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.zip) with score 1 lower than 20
   • Removing protobuf-all-3.17.3.tar.gz (URL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz) with score 1 lower than 20
   • Checking binary from https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-linux-x86_64.zip
   • Starting download of https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-linux-x86_64.zip
1.60 MiB / 1.60 MiB [---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 11.49 MiB p/s 1s
   • Keeping include/google/protobuf/duration.proto (URL ) with highest score 1
   • Keeping include/google/protobuf/source_context.proto (URL ) with highest score 1
   • Keeping include/google/protobuf/descriptor.proto (URL ) with highest score 1
   • Keeping include/google/protobuf/type.proto (URL ) with highest score 1
   • Keeping include/google/protobuf/empty.proto (URL ) with highest score 1
   • Keeping include/google/protobuf/ (URL ) with highest score 1
   • Keeping include/google/protobuf/any.proto (URL ) with highest score 1
   • Keeping include/google/protobuf/api.proto (URL ) with highest score 1
   • Keeping include/google/protobuf/compiler/plugin.proto (URL ) with highest score 1
   • Keeping include/google/protobuf/wrappers.proto (URL ) with highest score 1
   • Keeping include/google/protobuf/struct.proto (URL ) with highest score 1
   • Keeping include/google/protobuf/timestamp.proto (URL ) with highest score 1
   • Keeping include/google/protobuf/field_mask.proto (URL ) with highest score 1

@breml
Copy link
Collaborator Author

breml commented Jun 18, 2021

@sirlatrom I did run it with --debug and my output looks the same as the output provided by @marcosnils.

marcosnils added a commit that referenced this issue Jun 19, 2021
This commit improves handling on the following cases:

- It filters directories from Zip extraction
- It handlers better the --all flag by showing exactly all the files
without any kind of filtering. Previously, even though that flag was
added, we were still doing some filtering based on the repo name

Fixes #103
sirlatrom pushed a commit that referenced this issue Jun 19, 2021
* Improve XP when using --all flag.

This commit improves handling on the following cases:

- It filters directories from Zip extraction
- It handlers better the --all flag by showing exactly all the files
without any kind of filtering. Previously, even though that flag was
added, we were still doing some filtering based on the repo name

Fixes #103

* Fix golint checks
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 a pull request may close this issue.

3 participants