Giter VIP home page Giter VIP logo

Comments (5)

tsloughter avatar tsloughter commented on July 30, 2024

I'm currently using a work around since I realized that if I simply define {module_name_suffix, ""} before epb_compatibility it will use that value instead of "_pb" :)

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

(Yes, was going to suggest that workaround as a short-term solution :) )

Hm. I was assuming the Erlang protobuffs always suffixed with _pb, so it'd be a natural thing for an epb_compatibility option to do, maybe even an expected thing of such an option.

Perhaps a sensible way forward would be to add (yet) an option epb_api or epb_functions for the functions, and let the epb_compatibility imply this and the other options outlined in #63. That way, you could specify epb_api (or epb_functions whichever is chosen) instead of epb_compatibility.

You mentioned earlier that you were a mix of erlang_protobuffs and custom code. Is this lacking of _pb suffix part of the custom code? Or am I wrong in my assumption that _pb is always added? (if yes to the latter, then scrap the option idea above)

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

I've got some code locally in which generation of functions encode/1 and decode/2 is now controlled by an epb_functions instead, which you could use. (And the epb_compatibility option expands to epb_functions plus a few more options)

But I'll wait a bit before pushing that, to hear your story, because I'm still confused about erlang_protobuffs and yet no _pb suffix, because maybe it means some other solution is better.

from gpb.

tsloughter avatar tsloughter commented on July 30, 2024

Hm, you seem to be right. We weren't actually using epb as a dep but the modules from it for generating the encode/decode functionality and writing it to a file of our own.

So it is only our use case that made this funky :). I'm fine with the workaround hack and we can close this.

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

Ok. I'll close this, but I'll probably push the epb_functions option in a while anyway, maybe waiting a bit first to see if any more changes pile up. Your workaround will continue to work the same way even with that, I figure.

(I also learned something about option design: if an option is a meta-option that expands to other options, then it should only expand to other options, and not have any extra meaning of its own; such extra meaning should be broken out to separate options instead)

from gpb.

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.