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

[bugfix] capturing package names crashes at runtime #55

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

keynmol
Copy link
Collaborator

@keynmol keynmol commented Aug 22, 2021

This is the minimal reproduction and fix for #54.

General idea is just to forget any symbols that have a Package flag.

While this fixes the repro and is small enough to seem generic enough, I don't think it does a great job in terms of failure rendering:

[info] - Capturing package names correctly *** FAILED ***
[info]   assertion failed
[info]   
[info]   cats.data.Chain(1, 2, 3).size != 3
[info]   |         |              |    |
[info]   |         |              3    false
[info]   |         cats.data.Chain$@34f86192
[info]   List(1, 2, 3)
[info]     com.eed3si9n.expecty.ExpectyBase$ExpectyListener.expressionRecorded(Expecty.scala:41)
[info]     com.eed3si9n.expecty.RecorderRuntime.recordExpression(RecorderRuntime.scala:40)
[info]     foo.ExpectyScala3Test$.$init$$$anonfun$4(ExpectyScala3Test.scala:73)

Although I can be persuaded that it's the way it's supposed to work, given the nature of power assertions :)

@eed3si9n @Baccata if you agree that it's a fix, I say we merge and release, and create another issue for all the strange Scala 3 only fixes we had to do - feels like we need a much more systematic approach for those things.

@keynmol keynmol changed the title Minimal reproduction and fix [bugfix] capturing package names crashes at runtime Aug 22, 2021
@Baccata
Copy link
Collaborator

Baccata commented Aug 23, 2021

I personally agree with the approach and the proposed plan 👍

@keynmol keynmol merged commit 0af9039 into eed3si9n:develop Aug 31, 2021
@keynmol keynmol deleted the fix-package-name-capturing branch August 31, 2021 09:25
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

Successfully merging this pull request may close these issues.

2 participants