Forth exercise has problems

Forth in Scala on Exercism has problems. Locally all tests pass fine, online it gives:

/mnt/exercism-iteration/src/main/scala/Forth.scala:183: error: type mismatch;
 found   : Either[ForthError.ForthError,ForthEvaluatorState]
    (which expands to)  Either[ForthError.Value,ForthEvaluatorState]
 required: Either[ForthError.ForthError,ForthEvalState]
    (which expands to)  Either[ForthError.Value,ForthEvalState]
            )((state, definition) => definition.evaluate(state))
                                                        ^
/mnt/exercism-iteration/src/main/scala/Forth.scala:272: error: type mismatch;
 found   : Either[ForthError.ForthError,ForthEvaluatorState]
    (which expands to)  Either[ForthError.Value,ForthEvaluatorState]
 required: Either[ForthError.ForthError,ForthEvalState]
    (which expands to)  Either[ForthError.Value,ForthEvalState]
          )((state, definition) => definition.evaluate(state))
                                                      ^
2 errors

Can you show your code? Also what version of Scala are you using? The test runner uses 2.13.10.

The code is public. I did not modify SBT

Where is your code public? Including that code here can help us troubleshoot where the issue stems from.

I’m not a Scala person, but it looks like there might be a version issue since the test runner uses 2.13.10, but the exercise’s SBT file references 2.13.6. That might be a red herring though.

(Solution is here: fstiffo's solution for Forth in Scala on Exercism)

Andreas thank you for the scouting, but the focus is not to have my solution confirmed, locally works fine and this is enough fo me. My report and your analysis I hope could help the team to fix the problem, the SBT if this it is the case.

We have probably a dozen people each day tell us their code works, when it turns out it doesn’t. So someone’s opinion on their own code isn’t really a validator to maintainers, even if it is correct :slight_smile:

What version of Scala are you using?

2 Likes

My SBT:

scalaVersion := “2.13.10”

libraryDependencies += “org.scalatest” %% “scalatest” % “3.2.10” % “test”
libraryDependencies += “org.scala-lang.modules” %% “scala-parser-combinators” % “2.1.0”