GithubHelp home page GithubHelp logo

Ugh implicit value classes about circe HOT 8 CLOSED

circe avatar circe commented on June 23, 2024
Ugh implicit value classes

from circe.

Comments (8)

xuwei-k avatar xuwei-k commented on June 23, 2024

or drop Scala 2.10 support?

from circe.

travisbrown avatar travisbrown commented on June 23, 2024

Thanks, @xuwei-k. There are at least a couple of other places where we have workarounds for 2.10—maybe it's time for version-specific source trees.

from circe.

fthomas avatar fthomas commented on June 23, 2024

Note that Scala.js currently does not look into shared/src/main/scala-$VERSION directories (see scala-js/scala-js#2005) so you would have to duplicate some files across js and jvm directories.

from circe.

chwthewke avatar chwthewke commented on June 23, 2024

Sorry for kind of barging in (saw @travisbrown 's tweet), but wouldn't making the field private (class FooOps(private val a: A) extends AnyVal etc.) be a viable fourth solution? It does seem to properly hide the a method.

from circe.

travisbrown avatar travisbrown commented on June 23, 2024

@chwthewke That works on 2.11, but not 2.10, unfortunately.

from circe.

chwthewke avatar chwthewke commented on June 23, 2024

@travisbrown Gotcha, thanks for the explanation

from circe.

propensive avatar propensive commented on June 23, 2024

I don't think option 2 is a bad choice. It would be consistent with the common approach of giving implicit values long, descriptive names to avoid likely clashes.

from circe.

 avatar commented on June 23, 2024

Note that Scala.js currently does not look into shared/src/main/scala-$VERSION dir....

Or copy https://github.com/InTheNow/sbt-catalysts/blob/master/src/main/scala/sbtcatalysts/CatalystsPlugin.scala#L156-L172

(Or... just use sbt-catalysts)

from circe.

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.