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

Include google's Timestamp #1193

Open
FadyQJ opened this issue Nov 24, 2024 · 0 comments
Open

Include google's Timestamp #1193

FadyQJ opened this issue Nov 24, 2024 · 0 comments

Comments

@FadyQJ
Copy link

FadyQJ commented Nov 24, 2024

I don't know if I am missing something but I can't seem to make it work I have

Cargo.toml

[dependencies]
prost = { version = "0.13.3" }
prost-types = { version = "0.13.3" }

[build-dependencies]
prost-build = { version = "0.13.3" }

test.proto

syntax = "proto3";

package test;

import "google/protobuf/timestamp.proto";

message ...

build.rs

fn main() {
    prost_build::Config::new()
        .extern_path(".google.protobuf", "::prost_types")
        .compile_protos(
            &[
                "proto/test.proto",
            ],
            &["proto/"]
        ).unwrap();
}

While building I always get

thread 'main' panicked at models\build.rs:13:11:
called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "protoc failed: google/protobuf/timestamp.proto: File not found.\r\test.proto:5:1: Import \"google/protobuf/timestamp.proto\" was not found or had errors.\r\test.proto:17:12: \"google.protobuf.Timestamp\" is not defined.\r\n" }
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

No branches or pull requests

1 participant