Git Product home page Git Product logo

Comments (4)

pascaldekloe avatar pascaldekloe commented on June 9, 2024 1

B.t.w., you can just type colf go (instead of colf Go test.colf) if you want to. The documentation is a bit fuzzy there. 😅

from colfer.

HeavenVolkoff avatar HeavenVolkoff commented on June 9, 2024 1

Hello, @pascaldekloe. Thank you for the quick answer.
However, I was under the impression that empty struct were valid values to be used with colfer.
I found this bug, because I was using colfer in a Go project with empty structs, mainly as acknowledges for some remote procedure calls.
Although the generated code was invalid, removing the unused eof label allowed it to compile and function correctly, as far as i could test.
Would it be possible to revert this change, and allow empty structs to be accepted in colfer? Is there any shortcoming of using empty struct with colfer?

from colfer.

pascaldekloe avatar pascaldekloe commented on June 9, 2024

Thank you for the detailed report Vítor. Somehow the non-empty check got lost. I will add it back again.

from colfer.

pascaldekloe avatar pascaldekloe commented on June 9, 2024

The empty struct encodes as a fixed single byte (0x7F). It encodes no information. Therefore I think it should not be used.

Why do you encode an acknowledge response? A zero byte payload is Colter's concept of NULL, regardless of the type. Wouldn't it be better to make your RPC setup skip NULL submission, and read zero payload as NULL again?

from colfer.

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.