Improving protoc compilation for golang

Open Beginner friendly
#656 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
build-system

Research direction

Start with gtfs-realtime.proto and inspect the package declaration around line 27 alongside the Go generated-code package documentation linked in the issue. Run protoc with Go generation to reproduce the import-path error, then verify that the proposed package metadata allows Go applications to compile against the GTFS-realtime specification.

Written by the indexing model from the issue text.

Description

Describe the problem

Currently protoc throws an error protoc-gen-go: unable to determine Go import path for "gtfs-realtime.proto" I believe this is in regard to no proper package name within the specification, though the specification on line 27 does have package transit_realtime; documentation at https://protobuf.dev/reference/go/go-generated-opaque/#package mention using option go_package = "example.com/project/protos/fizz"; to declare it, which is missing in the file.

Use cases

Easier compilation steps for golang applications using gtfs-rt specs :)

Proposed solution

:s/package transit_realtime;/option go_package = "github.com\/google\/transit";
perhaps?

Additional information

(not completely sure I used the correct template for this but yes)

Dominant language
No language data
Stars
1.1k
Forks
226
Avg merge
7d 17h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google/transit

All issues in google/transit

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.