Git Product home page Git Product logo

Comments (4)

sirthias avatar sirthias commented on August 24, 2024

Thank you for reporting!
This is a nice large test case for the deriveAll macros.
I'll look into it and report back tomorrow.

from borer.

sirthias avatar sirthias commented on August 24, 2024

Your example is excellent, since it contains a lot of important example cases for how complicated the dependencies between the sub nodes of an ADT can be.
Based on this example I was able to significantly improve the logic which drives the deriveAll macros.
Would it be ok if I included a stripped down version of your ADT in the tests for borer?
I.e. would you be ok with donating your ADT to the project as a test example?

from borer.

sirthias avatar sirthias commented on August 24, 2024

I've significantly improved the deriveAll logic, which should now be able to properly detect and automatically resolve all cycling dependencies within a complex ADT such as yours.

The ADT in your example can now receive its Codec with a simple:

  given Codec[Exp] = {
    import MapBasedCodecs._
    given Codec[ExprType]    = deriveCodec
    given Codec[TableColDef] = deriveCodec
    deriveAllCodecs[Exp]
  }

Note that ExprType and TableColDef still need their own line because they aren't part of the ADT.

I've included your ADT as a test case, because it demonstrates a lot of previously untested phenomena, such as dependencies and recursion into abstract sub types.
Please let me know if you would like me to take it out again, maybe due to some IP-related issue!

Thanks again for reporting!

from borer.

guntiso avatar guntiso commented on August 24, 2024

Would it be ok if I included a stripped down version of your ADT in the tests for borer? I.e. would you be ok with donating your ADT to the project as a test example?

Ok. Thanks for the fix!

from borer.

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.