Skip to content

Protobuf builtin packages do not work properly #4033

@hiporox

Description

@hiporox

What version of CUE are you using (cue version)?

cue version v0.14.1

go version go1.24.6
      -buildmode exe
       -compiler gc
       -trimpath true
     CGO_ENABLED 0
          GOARCH arm64
            GOOS darwin
         GOARM64 v8.0
cue.lang.version v0.14.1

Does this issue reproduce with the latest stable release?

Yes, this is the most recent version released

What did you do?

I have the following proto definition in a file named builtinpkg.proto:

syntax = "proto3";

package builtinpkg;

import "google/protobuf/timestamp.proto";

message DefaultPkgTestMsg {
  google.protobuf.Timestamp observed_at = 1;
}

When I run cue import proto builtinpkg.proto, I get an error

What did you expect to see?

I expected that this should work without providing an import path for google/protobuf/timestamp.proto because this is a builtin package and should output a valid cue file

What did you see instead?

could not find import "google/protobuf/timestamp.proto":
    ./builtinpkg.proto:5:1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions