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

reporting not helpful for obscure errors #523

Open
jeroenvandijk opened this issue Dec 11, 2024 · 0 comments
Open

reporting not helpful for obscure errors #523

jeroenvandijk opened this issue Dec 11, 2024 · 0 comments

Comments

@jeroenvandijk
Copy link
Contributor

jeroenvandijk commented Dec 11, 2024

Describe the bug

Certain type of errors in my project are not clearly reported by Polylith. I've demostrated two of them in this project:

First clone the repo

git clone https://github.com/jeroenvandijk/clojure-polylith-realworld-example-app

Scenario 1: parser error

For a file with parser error; external-test-runner is better

git checkout 03af25561e00a71b44cadc39c4020e68d9b356fa
clojure -M:poly test
clojure -M:poly test with:external-test-runner

Scenario 2: empty file

Both runners are not very helpful in case of an empty file. Unfortunately this is a realworld problem; my emacs creates empty files when I open a new buffer. If I forget to save it stays empty.

git checkout bc8409004707644f1af5fc0f8a0c83ce5e8fc001
clojure -M:poly test
clojure -M:poly test with:external-test-runner

For the empty file case both runners do not help (much), it would require some extra checks I guess.

Expected behavior

In general Polylith knows about the syntax problem and it gives a warning as a first output. However, in a big project this is easy to miss since the runner just continues with other output. The final error has nothing to do with the actual error. If instead Polylith would do a hard exit when running into the problem (by default or even as option to configure) this would be a big improvement.

The main improvement from the external-test-runner is that it is showing you the error at the end of the run.

Unfortunately for the empty file, both runners are not helping much, but arguably the external-test-runner is slightly more helpful.

Screenshots

Polylith default test runner in both scenario's
Screenshot 2024-12-11 at 13 15 36

Polylith external test runner in scenario 1
Screenshot 2024-12-11 at 13 23 07

Polylith external test runner in scenario 2
Screenshot 2024-12-11 at 13 16 38

Versions (please complete the following information):

polylith/clj-poly {:mvn/version "0.2.22-SNAPSHOT"}
io.github.seancorfield/polylith-external-test-runner
{:git/tag "v0.6.1" :git/sha "d0f51c2"
:deps/root "projects/runner"}
@jeroenvandijk jeroenvandijk changed the title error reporting not helpful for obscure errors reporting not helpful for obscure errors Dec 11, 2024
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

1 participant