emsdk >? 3.1.40 breaks javascript build
In #23585 (closed) we discovered that new versions of emsdk break some of the javascript tests.
For example we see in this job: https://gitlab.haskell.org/ghc/ghc/-/jobs/1598987
Unexpected failures:
/builds/ghc/ghc/tmp/ghctest-46palsnb/test spaces/testsuite/tests/callarity/unittest/CallArity1.run CallArity1 [bad exit code (1)] (normal)
/builds/ghc/ghc/tmp/ghctest-46palsnb/test spaces/testsuite/tests/corelint/LintEtaExpand.run LintEtaExpand [bad exit code (1)] (normal)
/builds/ghc/ghc/tmp/ghctest-46palsnb/test spaces/testsuite/tests/ghc-api/T10942.run T10942 [bad exit code (1)] (normal)
/builds/ghc/ghc/tmp/ghctest-46palsnb/test spaces/testsuite/tests/ghc-api/T18522-dbg-ppr.run T18522-dbg-ppr [bad exit code (1)] (normal)
/builds/ghc/ghc/tmp/ghctest-46palsnb/test spaces/testsuite/tests/ghc-api/T9595.run T9595 [bad exit code (1)] (normal)
Which are caused by failures of this kind:
T18522-dbg-ppr: ghc no longer supports single-file style package databases (/builds/ghc/ghc/_build/stage1/lib/package.conf.d) use 'ghc-pkg init' to create the database with the correct format.
Perhaps this is a regression in emsdk but for now in the images we are pinning the version to 3.1.40 which works.