Tests for exercise "accumulator" broken?


I can’t get my solution to the accumulate exercise to run successfully on exercism.org

It works in my local environment using the “make guile” command. Am I missing something?

Looking at the community solutions, it seems to be broken for everyone. There is no published solution that passes the latest tests.

The error shown is following:

An error occurred

An error occurred while running your tests. This might mean that there was an issue in our infrastructure, or it might mean that you have something in your code that’s causing our systems to break.

Please check your code, and if nothing seems to be wrong, try running the tests again.

I’ve asked @ErikSchierboom to check this next week.

1 Like

@rommudoh Could you share your solution?

I’ve been able to reproduce the behavior.
The error that is produced is:

Exception in read: invalid sharp-sign prefix #) on #<input port pid 9 stdout>

I don’t know any scheme, but the code that is being run is: scheme-test-runner/exercise.ss at main · exercism/scheme-test-runner · GitHub

The problem happens with the test for 1+ when run in docker.

With this test included I get your error message when running in docker. Without this test, docker runs the suite just fine and all other tests pass.

Since this test works just fine when run outside docker, I think the problem lies with the serialization of the test results.

If I add (define incr 1+) and replace 1+ in the test case with incr, docker handles the test cases fine, too.

hmm… maybe I should have looked not only at chez’ output, but also at guile’s intermediate output.

While I could not figure out how the weird representation of 1+ as \x31;+ would cause the error, look what appears in guile’s output: ... (unquote #{1+}#) ..., which is much closer to the error message.

So I removed the guile invocation and now the original test suite (running only in chez scheme) passes in docker, too.

According to guile’s documentation of this extended reader syntax, “widespread usage of it is discouraged because it is not portable and not very readable”.

If I understand the call sequences correctly, a chez-scheme script runs the submitted code in both chez and guile, reading their output … and then failing to handle guile’s reader extension. So the chez-error-message is caused by unparseable guile-syntax.

The incr hack above avoids the unportable syntax and all is well.