Skip to content

utcDateTime defaults to Protobuf.WellKnown.Timestamp #7089

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tjb1982
Copy link

@tjb1982 tjb1982 commented Apr 22, 2025

This makes TypeSpec.utcDateTime default to Protobuf.WellKnown.Timestamp by mapping utcDateTime to ref("google.prototype.Timestamp") making sure to import "google/protobuf/timestamp.proto".

This required the creation of a new type ProtoTypeInfo wrapping a ProtoType with source info to communicate to addType that this particular scalar is actually a reference that needs to be imported.

As reported in #1882

@tjb1982
Copy link
Author

tjb1982 commented Apr 22, 2025

@microsoft-github-policy-service agree company="nclk"

@tjb1982 tjb1982 changed the title 1882: utcDateTime defaults to Protobuf.WellKnown.Timestamp 1882: utcDateTime defaults to Protobuf.WellKnown.Timestamp Apr 22, 2025
@tjb1982 tjb1982 changed the title 1882: utcDateTime defaults to Protobuf.WellKnown.Timestamp #1882: utcDateTime defaults to Protobuf.WellKnown.Timestamp Apr 22, 2025
@tjb1982 tjb1982 changed the title #1882: utcDateTime defaults to Protobuf.WellKnown.Timestamp utcDateTime defaults to Protobuf.WellKnown.Timestamp Apr 22, 2025
Copy link
Contributor

❌ There is undocummented changes. Run chronus add to add a changeset or click here.

The following packages have changes but are not documented.

  • @typespec/protobuf
Show changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:protobuf The protobuf emitter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant