Giter VIP home page Giter VIP logo

Comments (6)

jcready avatar jcready commented on July 21, 2024

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.

KillingSpark avatar KillingSpark commented on July 21, 2024

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.

KillingSpark avatar KillingSpark commented on July 21, 2024

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.

jcready avatar jcready commented on July 21, 2024

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.

KillingSpark avatar KillingSpark commented on July 21, 2024

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.

kayla-glick avatar kayla-glick commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.