Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use encoded names in derivation macros #828

Merged
merged 2 commits into from Jan 18, 2018
Merged

Use encoded names in derivation macros #828

merged 2 commits into from Jan 18, 2018

Conversation

BenFradet
Copy link
Contributor

Here's how I tested it:

sealed trait Foo
case class Bar(xs: List[String]) extends Foo
case class Qux(i: Int, d: Option[Double]) extends Foo

val foo: Foo = Bar(List("abc", "def", "ghi"))
val json = foo.asJson.noSpaces
println(json)

@BenFradet BenFradet changed the title Use encoded names for term names in derivation macros Use encoded names in derivation macros Jan 18, 2018
@codecov-io
Copy link

codecov-io commented Jan 18, 2018

Codecov Report

Merging #828 into master will decrease coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #828      +/-   ##
==========================================
- Coverage   86.91%   86.83%   -0.09%     
==========================================
  Files          71       71              
  Lines        2324     2324              
  Branches      175      186      +11     
==========================================
- Hits         2020     2018       -2     
- Misses        304      306       +2
Impacted Files Coverage Δ
...o/circe/generic/util/macros/DerivationMacros.scala 76.47% <ø> (ø) ⬆️
...re/shared/src/main/scala/io/circe/KeyDecoder.scala 97.29% <0%> (-2.71%) ⬇️
.../core/shared/src/main/scala/io/circe/Decoder.scala 90.55% <0%> (-0.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0190821...af1c5c3. Read the comment docs.

@travisbrown
Copy link
Member

It'd be nice to have a failing test, but we can do that in a follow-up PR. Thanks, @BenFradet!

@BenFradet
Copy link
Contributor Author

I can add it in this PR, no worries 👍

@travisbrown
Copy link
Member

Great, thanks @BenFradet! I'll publish 0.9.1 as soon as it's ready and merged.

@BenFradet
Copy link
Contributor Author

@travisbrown added an hygiene test for scala js, is this what you had in mind?

@travisbrown
Copy link
Member

Yep, looks good to me (I just confirmed that cherry-picking the test commit onto master fails).

@travisbrown travisbrown merged commit 5153b24 into circe:master Jan 18, 2018
@BenFradet
Copy link
Contributor Author

Cool stuff, looking forward to 0.9.1 👍

@BenFradet BenFradet deleted the issue-819 branch January 18, 2018 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants