-
Notifications
You must be signed in to change notification settings - Fork 10
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
Inconsistent protobuf versions kclvm->python client #158
Comments
Thanks for the feedback. Maybe we need to change the protobuf deps to >=5.27.0 👀 |
@Peefy FYI: when I generate the python stub for https://github.com/kcl-lang/lib/blob/main/spec/spec.proto with https://github.com/kcl-lang/rust-protoc-bin-vendored, The generated python file claims to contain protobuf version 4.25.3: # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: spec.proto
# Protobuf Python Version: 4.25.3
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
# ... which was also your pinned version before your version bump. When I use
...So I think, the protobuf version of |
I see. Thank you! I seem to have used a higher version of protoc locally instead of KCL rust vendor's protoc, thank you. Additionally, PRs are also welcome, and we can fix them at 4.25.3. 👍 |
Closed by #161 |
Bug Report
I stumbled upon an inconsistency of protobuf versions used and also pinned/validated:
In the python client protobuf is pinned to >=4.25.3 (https://github.com/kcl-lang/lib/blob/main/python/pyproject.toml#L18)
The python client protobuf itself validates against 5.27.0 (https://github.com/kcl-lang/lib/blob/main/python/kcl_lib/api/spec_pb2.py#L14)
And the most relevant part is, that the kclvm/api implements also a different version. If you take the example Python client example you receive class references, which are not implemented in protobuf >= 5.27.0:
If you try to import that class directly from protobuf you get an import error:
There is an open issue protocolbuffers/protobuf#16935 (comment) which describes this.
kcl-lib == 0.10.3
The text was updated successfully, but these errors were encountered: