Comments (6)
Was the generated code using a newer version of the plugin/runtime (>2.9.1) than what you're using at runtime (<=2.9.1)? I had raised this concern in the PR where this change was introduced but I assumed that combination was rather unlikely.
from protobuf-ts.
I am pretty sure I was updating both runtime and the environment I was using to generate the code in lockstep. I will double check this tomorrow. If that actually is the issue that's my bad I definitely intended to update it in lockstep
from protobuf-ts.
Sorry for the bother, I noticed that I did in fact not propgate the update of the protobuf-ts/runtime to the correct subfolder. Works as expected with both generation and runtime on 2.9.3
from protobuf-ts.
One way to cover all the bases here would be for the generated code to also perform the Object.defineProperty()
call in its constructor rather than rely on the runtime's MessageType
constructor from which it inherits. Seeing as someone has already hit this supposed edge case it wouldn't be the worst solution to ensure it doesn't happen again.
from protobuf-ts.
I want to add that this was caused by our (I think) unusual way of structuring our repos. I do think that hitting this is in fact an edge case :)
from protobuf-ts.
Hey @jcready I just ran into this issue today with a project I work on https://github.com/wowsims/sod after we upgraded from 2.9.1 to 2.9.4. I'm not 100% sure but I wonder if it's the backwards-compatibility issue you mentioned in your PR?
I also just wanted to add that downgrading back to 2.9.1
was a bit of work. In our package.json
we had
"@protobuf-ts/plugin": "2.9.1",
"@protobuf-ts/runtime": "2.9.1",
but the @protobuf-ts/plugin-framework
and @protobuf-ts/protoc
dependencies didn't respect the version lock and were still using ^2.9.1
which installed 2.9.4 instead. We had to manually install these locked to 2.9.1
"@protobuf-ts/plugin": "2.9.1",
"@protobuf-ts/plugin-framework": "2.9.1",
"@protobuf-ts/protoc": "2.9.1",
"@protobuf-ts/runtime": "2.9.1",
from protobuf-ts.
Related Issues (20)
- unused parameters in the empty.ts are causing TypeScript check errors HOT 6
- Global `Object` is not referenced when there is a message named Object. HOT 2
- Proto2 required fields are not serialized when they are the default value HOT 3
- Is this compiling error could be turned off by Typescript or Option in protobuf-ts HOT 2
- 2.9.2 not working with 'exactOptionalPropertyTypes: true' HOT 1
- Generated message classes cannot be subclassed because of missing 'export' HOT 1
- Error decoding from binary: "cant skip wire type 4" HOT 1
- How to debug INVALID_ARGUMENT? HOT 1
- Missing headers on RPCError HOT 8
- rpcError cannot support Chinese
- [Request] Flag to handle google wrapper types HOT 1
- Vite cannot found module HOT 2
- Invalid typescript in descriptor.ts HOT 2
- Can't retry request after awaiting response HOT 2
- Typesafe API to retrieve enums from strings HOT 4
- `output_javascript` no longer emits `.d.ts` files HOT 6
- Request: Support for moduleResolution "nodenext" and "node16" HOT 2
- Fails to download v27.0-rc1 (which was just released) HOT 7
- invalid url for latest v27.0-rc1 release HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protobuf-ts.