-
Notifications
You must be signed in to change notification settings - Fork 88
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
protoc error: Explicit 'optional' labels are disallowed in the Proto3 syntax #482
Comments
@jonathan-dilorenzo, I believe you recently added this field. I suspect the Thanks for reporting the issue, @duskmoon314. |
|
Nonetheless, good question. No idea why I put the optional qualifier in there. Let me take an AI to get rid of it (and add a comment about when the field was introduced at the same time). |
This one is installed via apt, and it is v3.12.4 on Ubuntu 22.04. But I also see the error when using Oh, I didn't notice that the last build of that image was two years ago. Should the image be updated, or should I use Bazel to build the proto instead of |
That sounds unlikely. The script is run every time the main branch is updated. This is the latest run, from last week: https://github.com/p4lang/p4runtime/actions/runs/8991480949
This is accurate, but it still comes with protoc v3.18.1:
It's unlikely anyone is going to update this image unless it is required (e.g., for some CI purposes). |
Em, I think I got the wrong image. I need to check what's wrong with docker. Here is the output when I run ❯ docker pull p4lang/third-party
Using default tag: latest
latest: Pulling from p4lang/third-party
4f53fa4d2cf0: Already exists
6af7c939e38e: Already exists
903d0ffd64f6: Already exists
04feeed388b7: Already exists
fda0447a2aef: Already exists
d542ede27a5b: Already exists
b51b1233ed05: Already exists
c82aee7e3df0: Already exists
dfbd36aecb5f: Already exists
e4a0a292616b: Already exists
2a545cc6126f: Already exists
fddeaa06596f: Already exists
f9b99e89d373: Already exists
4e7b4af9333f: Already exists
a87f1c53893b: Already exists
11b7960c4654: Already exists
846e5f482b63: Already exists
5c787c58e206: Already exists
34599a8d9776: Already exists
a6c7643c8f08: Already exists
Digest: sha256:a0f2e9a741bab06cc8dd478183541c1260ca4e174d954a21af3eb7e63559dd8b
Status: Downloaded newer image for p4lang/third-party:latest
docker.io/p4lang/third-party:latest
❯ docker run -it --rm p4lang/third-party bash
root@aee361934b1f:/# protoc --version
libprotoc 3.6.1 For some unknown reason, the image I got via |
This is not the correct sha for the current I am able to pull the same image as you if I provide the same sha explicilty: You could try pulling with the correct sha. |
Looks like I replied just as you edited the post. Not sure why you are seeing a stale image by default when you use |
I'm using the machine of our lab and the manager added a I'm testing |
Thanks for your help. No error occurs now! I assume the use of this keyword in intentional and close this issue for now. |
Let's keep this open until we have also resolved #482 (comment). The |
@jonathan-dilorenzo, would you be able to send a quick follow-up so we can close this? |
@jonathan-dilorenzo bump - we want in 1.4.0 |
Fixes #482 (comment) Signed off by Steffen Smolka <smolkaj@google.com>
Fixes #482 (comment) Signed-off-by: Steffen Smolka <smolkaj@google.com>
I'm trying to add scripts to generate rust code and encountered this error.
In
proto/p4/config/v1/p4info.proto
, anoptional
is used at L314:When generating codes with protoc, an error occurs (no matter what language is targeted):
I'm not very familiar with protobuf. Should this
optional
be removed, or should the flag--experimental_allow_proto3_optional
be used after all protoc usage?The text was updated successfully, but these errors were encountered: