Skip to content

protoc assets for macOS and Linux arm64 are not selected (osx, aarch_64) #171

Closed

Description

@roxblnfk

Description

dload get protoc fails on macOS (arm64 and x86_64) and on Linux arm64: no asset of a protoc release is selected, although the release has a build for each of these platforms. Linux x86_64 and Windows work.

protoc names its assets with tokens DLoad does not recognize:

protoc-36.2-linux-aarch_64.zip
protoc-36.2-linux-x86_64.zip
protoc-36.2-osx-aarch_64.zip
protoc-36.2-osx-universal_binary.zip
protoc-36.2-osx-x86_64.zip
protoc-36.2-win32.zip
protoc-36.2-win64.zip
  • osx is not an OS token: OperatingSystem::tryFromString() knows darwin and macos only, so every osx-* asset is dropped for Darwin.
  • aarch_64 is not an architecture token: Architecture::tryFromBuildName() matches aarch64 but not the underscored form, so linux-aarch_64 and osx-aarch_64 are dropped for arm64.

Steps to reproduce

  1. DLoad 1.19.0, <download software="protoc" version="^36.0"/> in dload.xml (or vendor/bin/dload get protoc).
  2. Run on macOS or Linux arm64 (or force the platform the way roadrunner/cli does: os darwin / linux, arch arm64).
  3. No protoc asset is selected and the download fails.

Proposed solution

  • OperatingSystem: read osx as Darwin (in tryFromString() and in the build-name pattern of tryFromBuildName()).
  • Architecture: read aarch_64 as ARM_64 (aarch[_-]?64, like the existing x86[_-]64).
  • Optionally treat universal_binary / universal as a macOS build for both architectures, as a fallback when no arch-specific asset exists.
  • A test over the real protoc asset list above.

Additional context

Blocks rr get-grpc-tools (roadrunner-php/cli#76) on macOS and Linux arm64: buf and protoc-gen-php-grpc install there, protoc does not. spiral/roadrunner-bridge 5.x generates gRPC code with buf and needs protoc next to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions