The ReScript track is available for testing to maintainers. Feedback appreciated if you can help find any issues before we go live!
I hit an immediate error on hello-world: following npm install
$ npm run test
> test
> rescript && retest tmp/tests/*.js
[1/3] đź§ą Cleaned previous build due to compiler update
[1/3] đź§ą Cleaned 0/3 in 0.00s
[2/3] đź§± Parsed 3 source files in 0.01s
[3/3] 🤺 Compiled 3 modules in 0.03s
✨ Finished Compilation in 0.06s
node:internal/modules/esm/resolve:272
throw new ERR_MODULE_NOT_FOUND(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/glennj/src/exercism/exercism.io/rescript/hello-world/node_modules/rescript-test/src/Test.js' imported from /home/glennj/src/exercism/exercism.io/rescript/hello-world/node_modules/rescript-test/bin/retest.mjs
at finalizeResolution (node:internal/modules/esm/resolve:272:11)
at moduleResolve (node:internal/modules/esm/resolve:879:10)
at defaultResolve (node:internal/modules/esm/resolve:1006:11)
at #cachedDefaultResolve (node:internal/modules/esm/loader:708:20)
at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:728:38)
at ModuleLoader.resolveSync (node:internal/modules/esm/loader:766:56)
at #resolve (node:internal/modules/esm/loader:690:17)
at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:610:35)
at node:internal/modules/esm/loader:639:32
at TracingChannel.tracePromise (node:diagnostics_channel:538:22) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///home/glennj/src/exercism/exercism.io/rescript/hello-world/node_modules/rescript-test/src/Test.js'
}
Node.js v26.7.0
If I look into that module director
$ ll node_modules/rescript-test/src/
Permissions Links Size User Date Modified Git Name
.rw-r--r-- 1 7.4k glennj 2 Oct 16:21 -I Test.res
.rw-r--r-- 1 8.7k glennj 2 Oct 16:21 -I Test.res.js
.rw-r--r-- 1 1.0k glennj 2 Oct 16:21 -I Test.resi
So we have Test.res.js not the expected Test.js
However if I do the same thing the runner does
$ node_modules/.bin/rescript build
...
$ node_modules/rescript-test/bin/retest.mjs tests/HelloWorld_test.res.js
1/1: Say Hi!
FAIL - Say Hi!
---
operator: equal
left: Goodbye, Mars!
right: Hello, World!
...
# Ran 1 tests (1 assertions)
# 0 passed
# 1 failed
Perhaps the “test” recipe in package.json needs updating?
Oh! Got it. There’s a stray tmp in package.json
$ command diff package.json.orig package.json
23c23
< "test": "rescript && retest tmp/tests/*.js",
---
> "test": "rescript && retest tests/*.js",
Should the package-lock.json files be in git for each exercise?
The test doc says
Run the Tests
Compile and run the provided test suite using either
exercism testornpm install.
Should clearly be npm run test
That test command setup is in all the exercises so I’ll troubleshoot that.
I’ll also update the docs reference since that was an earlier draft.
I think the lock files should be in the gitignore, but I’ll do some more research before I touch that.
A build side-effect appears to be a lib directory. Please add it to .gitignore
I noticed that acronym’s config.json does not correspond to the track’s config files structure. Are you intending to allow students to edit “src/PascalSlug.resi” ?
Thanks, the lib folder was ignored in the root .gitignore file so that was an oversight not adding it to the exercise-level .gitignores. That’s merged in.
For acronym, I think that was before we settled on making the interface files editable. I found a couple of other affected exercises so that’s also merged in.
Edit - Remaining changes were made. I did decide I want to keep package-lock.json in git for reproducibility’s sake.