Skip to content

Conversation

essen
Copy link
Contributor

@essen essen commented Oct 8, 2025

PoC for #10260

I figured that I would get the filename from the same place exceptions already do since it's the most appropriate and there's no need to tweak the filename. With this filename I could then have GitHub annotate PRs with the exact failure location.

In the shell it looks like this:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
compress_SUITE:gzip_accept_encoding_malformed (test/compress_SUITE.erl) failed on line 75
Reason: {badmatch,2}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Or

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cowboy_test:gun_open (test/cowboy_test.erl) failed on line 184
Reason: {badmatch,{error,{no_quicer,"Cowboy must be compiled with en...}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I haven't added tests, let's see if this is an approach that would be OK first.

Copy link
Contributor

github-actions bot commented Oct 8, 2025

CT Test Results

  2 files   57 suites   1h 15m 39s ⏱️
451 tests 436 ✅ 15 💤 0 ❌
485 runs  467 ✅ 18 💤 0 ❌

Results for commit df73e4a.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@essen essen force-pushed the loic-ct-source-file-in-output branch from f92424a to c1c440b Compare October 8, 2025 20:48
@michalmuskala
Copy link
Contributor

With the same logic as in #9468, it would likely be better to have the format as path/to/file:LINE - many tools recognise that and make it "clickable". This would also align the format with compiler errors and stack trace printing (since OTP 28).

cc @TheGeorge

@essen
Copy link
Contributor Author

essen commented Oct 9, 2025

Sure, we could do that when we have a filename. What if we don't, do we keep the error message as it is now?

@TheGeorge
Copy link
Contributor

We could emulate this via <module_name>.erl: or keep the existing format

@essen essen force-pushed the loic-ct-source-file-in-output branch from c1c440b to df73e4a Compare October 10, 2025 12:14
@essen
Copy link
Contributor Author

essen commented Oct 10, 2025

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cowboy_test:gun_open at test/cowboy_test.erl:184 failed
Reason: {badmatch,{error,{no_quicer,"Cowboy must be compiled with en...}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@IngelaAndin IngelaAndin added the team:PS Assigned to OTP team PS label Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:PS Assigned to OTP team PS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants