You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry about the long title, but this is a weird one and I wasn't sure how to name that.
I had the problem in my configuration, here's a simplified version:
objectTest {
importpureconfig.generic.auto._importeu.timepit.refined.pureconfig._// I tried removing the refined import and explicitly declaring the implicit, but it didn't change anything/* implicit val evidence: ConfigConvert[NonEmptyString] = new ConfigConvert[NonEmptyString] { override def to(a: NonEmptyString): ConfigValue = ??? override def from(cur: ConfigCursor): Result[NonEmptyString] = ??? } */implicitvalevidenceMg:ConfigConvert[McGuffin] =newConfigConvert[McGuffin] {
overridedefto(a: McGuffin):ConfigValue=???overridedeffrom(cur: ConfigCursor):Result[McGuffin] =???
}
caseclassTestedNes(a: Set[NonEmptyString])
caseclassTestedNesList(a: List[NonEmptyString])
caseclassTestedPi(a: Set[PosInt])
caseclassTestedMg(a: Set[McGuffin])
classMcGuffindefsuccessWithList= loadConfig[List[TestedNes]]
defsuccessWithListInside= loadConfig[Set[TestedNesList]]
defsuccessWithoutCollection= loadConfig[TestedNes]
defsuccessWithoutCaseClass= loadConfig[Set[Set[NonEmptyString]]]
defsuccessWithoutRefined= loadConfig[Set[TestedMg]]
deffailureWithNonEmptyString= loadConfig[Set[TestedNes]]
deffailureWithPosInt= loadConfig[Set[TestedPi]]
}
The definitions of failureWithPosInt and failureWithNonEmptyString do not compile.The same problem exists with Seq instead of Set, but it goes away with List either on the inner or the outer collection (so there's a workaround, but I'd rather have Sets as that's what makes sense in my model). It is linked to Refined somehow, as using a random class instead didn't fail (whether I'm using Set or Seq), but I just can't see how.
I'm using version 0.9.8 with refined-scalaz, refined-pureconfig and refined-scopt.
The text was updated successfully, but these errors were encountered:
gaelrenoux
changed the title
[pureconfig] Refined cannot be read inside a Collection inside a Product inside a Collection
[pureconfig] Refined cannot be read inside a Collection inside a Case Class inside a Collection
Jul 15, 2019
Sorry about the long title, but this is a weird one and I wasn't sure how to name that.
I had the problem in my configuration, here's a simplified version:
The definitions of failureWithPosInt and failureWithNonEmptyString do not compile.The same problem exists with Seq instead of Set, but it goes away with List either on the inner or the outer collection (so there's a workaround, but I'd rather have Sets as that's what makes sense in my model). It is linked to Refined somehow, as using a random class instead didn't fail (whether I'm using Set or Seq), but I just can't see how.
I'm using version 0.9.8 with refined-scalaz, refined-pureconfig and refined-scopt.
The text was updated successfully, but these errors were encountered: