Skip to content

Inconsistent File Path and Package for beam_hopping.proto in api/solver/v1alpha/ #96

@jjpinto

Description

@jjpinto

I encountered a structural inconsistency while using standard tooling (buf, protoc-gen-go, and protoc-gen-go-grpc) to work with your Protocol Buffer definitions. This issue violates common Protobuf best practices and creates build complexity for downstream users.

The Package-Path Mismatch

The file beam_hopping.proto is currently located here: api/solver/v1alpha/beam_hopping.proto

However, its defined package is: package aalyria.spacetime.api.beam_hopping.v1alpha;

This difference between the directory (solver) and the logical package (beam_hopping) is the root cause of the problems below.

Impact on Developer Tooling

Standard Protobuf convention dictates that the file path must mirror the package structure for reliable dependency resolution. This mismatch directly impacts modern Go tooling:

=> buf (Buffer):
It causes the PACKAGE_DIRECTORY_MATCH lint rule to fail, preventing users from achieving a clean lint pass and complicating CI/CD pipelines.
It complicates or prevents the use of standard Go output configurations with buf generate, as the tool strictly enforces path consistency.

=> Go Code Generators (protoc-gen-go / protoc-gen-go-grpc):
When generating code using preferred options like paths=import, the compiler struggles to correctly map the Protobuf dependency to a valid Go import path.
To work around this, users are forced to manually employ the complex M (Mapping) flag for this file when running protoc, which is highly discouraged and increases build complexity for consumers of this API.

Proposed Resolution

To resolve this structural issue and align with the broader Protocol Buffer ecosystem, I recommend relocating the file to the conventional path that directly mirrors its package name:

Relocate: api/solver/v1alpha/beam_hopping.proto
To: api/beam_hopping/v1alpha/beam_hopping.proto

This change will resolve the consistency violation, simplify integration, and ensure compliance with modern Protocol Buffer and Go tooling best practices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions