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

Recent updates to the node-test-runner have broken the run-tests.sh script #1103

Open
harrysarson opened this issue Apr 5, 2021 · 6 comments

Comments

@harrysarson
Copy link
Contributor

harrysarson commented Apr 5, 2021

To reproduce:

./tests/run-tests.sh

The error is:

/home/harry/repo/elm/core/tests/elm.json
Failed to read elm.json:
Expected "source-directories" to contain at least one item, but it is empty.

# clear out the copy of elm-core fetched by the above and replace it
# with the local source code we want to actually test

VERSION_DIR="$(ls ${ELM_HOME}/0.19.1/packages/elm/core/)"
ls: cannot access '/home/harry/repo/elm/core/tests/.elm/0.19.1/packages/elm/core/': No such file or directory

and then when I fix that I get:

Failed to run `elm-json solve`:

-- NO VALID PACKAGE VERSION ----------------------------------------------------

Because elm/core does not appear to exist and this project depends on elm/core
at any version, no valid set of package versions could be found.



# clear out the copy of elm-core fetched by the above and replace it
# with the local source code we want to actually test

VERSION_DIR="$(ls ${ELM_HOME}/0.19.1/packages/elm/core/)"
ls: cannot access '/home/harry/repo/elm/core/tests/.elm/0.19.1/packages/elm/core/': No such file or directory

Looks like the upgrade to [email protected] (where we added elm-json amongst other things) caused this script to fail.

@github-actions
Copy link

github-actions bot commented Apr 5, 2021

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

@harrysarson
Copy link
Contributor Author

As the one who released the offending version of elm-test, sorry!

@jfmengels
Copy link
Contributor

@harrysarson What is your opinion on what should be done? Is this an issue you are tracking in node-test-runner?

@harrysarson
Copy link
Contributor Author

I put a PR up at #1104 which is one way to fix this. @mpizenberg had a good idea on discord for how to keep using node-test-runner to run tests but I got distracted and never looked at it properly.

Given that tests.sh used all sorts of hacks to get this working I am pretty confident that the fix should be here.

@mpizenberg
Copy link

Yep, here is the fix: master...mpizenberg:tests-alternative

Works with both elm-test and elm-test-rs, and I think is simpler than the current setup

@harrysarson
Copy link
Contributor Author

#1104 is now ready (from my end) to land. It is the minimal PR that fixes ./tests/run-tests.sh. A follow up PR to migrate the CI to github actions (or to fix travis so that the status appears on PRs) would be nice but I decided to keep #1104 as simple as possible in the hope that is can be merged with minimum friction and unblock other PRs here. :)

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

3 participants