Call for testing of elm-explorations/test 2.0.0

Hello everybody,

the elm-explorations/test 2.0.0 release is just around the corner! :tada:

It brings (among other things) a rewrite of the Fuzz module and of the underlying fuzzing / shrinking machinery. That gives users a lot of nice API improvements (eg. Fuzz.andThen), and we’d like you to test the 2.0.0 version on your test suites and give feedback before the release gets published for everybody.


On that note, we’ve added a new pair of commands to elm-test to help with that:

  • elm-test install-unstable-test-master
    • which will install elm-explorations/test @ master in place of the 1.2.2 version in your ELM_HOME
  • elm-test uninstall-unstable-test-master
    • which will undo that

To gain access to these commands and more improvements, upgrade to the 0.19.1-revision8 version of elm-test runner with:

$ npm install elm-test@0.19.1-revision8

(More information about the elm-test release in @lydell’s post: Elm-test 0.19.1-revision8 released!)


To give you an idea about what’s coming in elm-explorations/test 2.0.0, here is the full commented API diff between 1.2.2 and 2.0.0: elm-test 2.0.0 upgrade guide · GitHub

We hope you’ll like it!

20 Likes

I gave this a quick try on two work projects.

First one has 501 tests, but with the upgrade I got this compile error

Compiling
– ERROR -----------------------------------------------------------------------

I ran into something that bypassed the normal error reporting process! I
extracted whatever information I could from the internal error:

Map.!: given key is not an element in the map
CallStack (from HasCallStack):
error, called at libraries\containers\Data\Map\Internal.hs:610:17 in containers-0.5.11.0:Data.Map.Internal

These errors are usually pretty confusing, so start by asking around on one of
forums listed at community to see if anyone can get you
unstuck quickly.

– REQUEST ---------------------------------------------------------------------

If you are feeling up to it, please try to get your code down to the smallest
version that still triggers this message. Ideally in a single Main.elm and
elm.json file.

From there open a NEW issue at Issues · elm/compiler · GitHub with your
reduced example pasted in directly. (Not a link to a repo or gist!) Do not worry
about if someone else saw something similar. More examples is better!

This kind of error is usually tied up in larger architectural choices that are
hard to change, so even when we have a couple good examples, it can take some
time to resolve in a solid way.elm.EXE: Map.!: given key is not an element in the map
CallStack (from HasCallStack):
error, called at libraries\containers\Data\Map\Internal.hs:610:17 in containers-0.5.11.0:Data.Map.Internal

elm make failed with exit code 1.

The second project had 43 tests and that ran without a problem.

Hey @harmboschloo, thanks for trying the library out!

As for the error, that’s a hard one to debug. Elm 0.19.1 has dealt with most of these, but it seems like you found a way to trigger it :slight_smile:

Based purely on a hunch, could you please try to remove elm-stuff and ~/.elm before running the elm-test install-unstable-test-master and elm-test commands again?

Yes that helped.

Seems the problem is that we have avh4/elm-program-test in our direct dependencies and elm-explorations/test also in our indirect dependencies. Not sure if I can work around that, or why that would be a problem though. :thinking:

– PROBLEM BUILDING DEPENDENCIES -----------------------------------------------

I ran into a compilation error when trying to build the following package:

avh4/elm-program-test 3.6.3

This probably means it has package constraints that are too wide. It may be
possible to tweak your elm.json to avoid the root problem as a stopgap. Head
over to community to get help figuring out how to take this
path!

That’s likely a consequence of disguising the master version of elm-test as 1.2.2. We likely won’t be able to betatest this + elm-program-test together unless you want to go patching your local copy of elm-program-test inside ~/.elm :slight_smile:

Thanks for trying!

Yeah, makes sense. I did try another project with 1000+ tests and that worked fine.