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

io.circe.pointer.literal.PointerInterpolatorSuite seems Flaky (or there's a bug?) #2160

Open
MartinHH opened this issue Jun 15, 2023 · 2 comments

Comments

@MartinHH
Copy link
Contributor

The CI for PR #2156 failed with:

io.circe.pointer.literal.PointerInterpolatorSuite:
  + The pointer string interpolater should parse valid absolute JSON pointers 0.04s
  + The pointer string interpolater should parse valid relative JSON pointers 0.002s
  + The pointer string interpolater should work with interpolated values that need escaping 0.0s
==> X io.circe.pointer.literal.PointerInterpolatorSuite.The pointer string interpolater should work with arbitrary interpolated strings  0.294s munit.FailException: /home/runner/work/circe/circe/modules/pointer-literal/src/test/scala/io/circe/pointer/literal/PointerInterpolatorSuite.scala:47
46:
47:  property("The pointer string interpolater should work with arbitrary interpolated strings") {
48:    Prop.forAll(ScalaCheckInstances.genPointerReferenceString) { (v: String) =>

Failing seed: ti47UAvFZKoH5ggwYNhAsvoTmWb6j9CsslvYR17sYqM=
You can reproduce this failure by adding the following override to your suite:

  override def scalaCheckInitialSeed = "ti47UAvFZKoH5ggwYNhAsvoTmWb6j9CsslvYR17sYqM="

Falsified after 28 passed tests.
> Labels of failing property: 
Expected Right(/foo/~0/bar) but got Left(io.circe.pointer.PointerSyntaxError: Syntax error at 5; expected: token character)
> ARG_0: "~"
> ARG_0_ORIGINAL: "⠾Ḏᩁ鈋㚞ठۙ닂똈ᤂ貖ᖸâ㩍埗繤휅♅蟻⤬~0ᖐ弳叅અ㋕"

That can be reproduced on the main (series/0.14.x) branch.

@MartinHH MartinHH mentioned this issue Jun 15, 2023
@MartinHH
Copy link
Contributor Author

Ah, seems like a known issue - quoting from #1991 (comment) :

Note, there is probably still more to do here in the future. The tests are slightly different in their structure for Scala 2/3 and from glancing at the RFC I suspect there are issues with the current pointer implementation when a reference contains Unicode characters which are represented by surrogate pairs of bytes under UTF-8.

@armanbilge
Copy link
Contributor

armanbilge commented Oct 20, 2023

ping @isomarcte via #1998 (comment)

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

No branches or pull requests

2 participants