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

Error in spec for palindrome-products #177

Open
keiravillekode opened this issue Mar 10, 2025 · 4 comments
Open

Error in spec for palindrome-products #177

keiravillekode opened this issue Mar 10, 2025 · 4 comments
Assignees

Comments

@keiravillekode
Copy link
Contributor

Described in
https://forum.exercism.org/t/error-in-spec-for-palindrome-products/16214

Reproduced:
Submitting the example solution gives

We received the following error when we ran your code:
  ● Test suite failed to run

    Cannot find module 'core-js/modules/es.array.push.js' from '../..<solution>/palindrome-products.spec.js'

Possible steps for investigation:

@atk
Copy link
Contributor

atk commented Mar 11, 2025

I can only infer from the outside what happened, so these are merely my assumptions: during deployment, the network connection became unstable, leading to the core package not being available. Since Array.prototype.push is the first polyfill to be called by Babel, the missing package leads to errors before the tests even run.

Proposed solution: redeployment with new version.

@atk
Copy link
Contributor

atk commented Mar 11, 2025

I have changed the spec not to use Array.prototype.push, but I could only locally reproduce the issue by removing the file that was missing in the testing back end.

@atk atk self-assigned this Mar 11, 2025
@keiravillekode
Copy link
Contributor Author

keiravillekode commented Mar 11, 2025

The spec change has successfully fixed palindrome-products.

I think the error was a consequence of
https://github.com/exercism/wasm-test-runner/blob/07445f4d85366138321fc379f8b5f08127dd193c/Dockerfile#L32

Minimizing the test runner image size is important to save Exercism storage costs on the test runner servers. If we add to package.json or pnpm-lock.yaml, I'm not sure how we measure the increase in image size.

If we add a ci workflow that calls wasm-test-runner, the problem won't reach users again.

@atk
Copy link
Contributor

atk commented Mar 12, 2025

If we wanted to minimize the bundle size for the test runner, we should consider switching to vitest. On the other hand, we could consider moving away from JS and run the code using wasmer.io

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