-
Notifications
You must be signed in to change notification settings - Fork 69
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
How to deal with incompatibility between @bufbuild/protobuf@"^2.0.0" and @bufbuild/protobuf@"^1.10.0 #956
Comments
I ran into this issue too. It seems to be because v2.0.0 went live recently, and it has some breaking changes. The way I solved this was by just changing the SDK version back to 1.9.0. Observation: This is in the repository's SDKs tab. Notice how it uses I don't really like this change. They also removed classes for 2.0.0, which will require some big refactors by some people, breaking their CI/CD overnight. I hope 1.9.0 will last for a while. I feel like this is kind of a big deal and will honestly make me think twice before relying on Buf moving forward. |
That fixed it thank you very much. |
For some reason, no matter what version i'm installing, it'll always compile the code with protoc-gen-es v2.0.0. |
Hey there, we're sorry for the inconvenience. The situation here is similar to any other case involving major version updates: Imagine that you previously installed a package that depends on react 17. If you later install another package that depends on react 18, you'll get a peer dependency resolution error, because react 17 and 18 cannot be used at the same time. You'll have to install versions with matching peer dependencies, and install an older version of the second package that still uses react 17. Generated SDKs remove quite a bit complexity, but this constraint still applies. Picking the plugin version in the BSR as described in #956 (comment) is the best solution. @V1210N, can you elaborate how this broke CI/CD for you? All versions should be pinned in a lock file by the package manager when using generated SDKs, and builds should be reproducible. Regarding the issue @Evilu ran into: As explained in #957 (comment), the latest version is used when generating with remote plugins if you don't specify the version. We realize this isn't ideal, and we're looking into improving the system, but it's unrelated to remote SDKs. The best solution is to specify the version. |
I have a project stateful/vscode-runme that is currently importing the BSR registry stateful/runme.
I'm trying to add the newly created BSR registry jlewi/foyle to that project. When I run
I can't a dependency conflict because they are depending on different versions of
@bufbuild/protobuild
.It looks like v2.0.0 was released a few days ago and per the documentation seems to introduce backwards incompatible changes to support protobuf editions.
Is there a way to control which version bufbuild/protobuf-es the generated SDK uses?
The text was updated successfully, but these errors were encountered: