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
@kevingomu I doubt this problem has something to do with your project set up, it rather looks like your types don't work out. Unfortunately, your example code lacks important type information, so it's hard to help you based on this. I recommend extracting a minimal working (=reproducing behavior) example when you ask for help. That can be a little tricky, but often you'll find the fix for your problem while doing that already and if not, people can help you way more concrete.
Taking your example code and some guesses on what types you have there, I get the following snippet working nicely:
// Assuming you have some collection of checks you want to combinevalvalidationCriteria:List[Int=>ValidatedNel[String, Int]] =List(
i =>Validated.condNel(i >5, i, "Too small")
// i => ...
)
valcri=7// Dummy input
validationCriteria
.map(_.apply(cri)) // assuming your .validate takes the cri and produces a ValidatedNel
.sequence // List[ValidatedNel[Error, SomeType]] => ValidatedNel[Error, List[SomeType]], can be combined with the previous .map to .traverse
.map(_ => cri) // can be written as .as(cri), but seems unused anyway
.toEither // unnecessary, Validated(Nel) has a .fold
.fold(_ =>false, _ =>true) // simplified for readability
Hi all,
I am trying to run docker:publishLocal where I am faced with this error:
Class A resides in project A, and classB is in project B, and they have this kind of structure:
The build.sbt looks like this:
I have researched around and I have added stuff like the "-Ypartial-unification", but to no avail:
plugins.sbt has this:
addSbtPlugin("org.lyranthe.sbt" % "partial-unification" % "1.1.2")
The method that is throwing the error is:
Sorry I have to obfuscate the methods. If it is unclear, please let me know and I will provide any info that I could.
I'm running sbt version 1.2.7
Thank you so much.
The text was updated successfully, but these errors were encountered: