Open vil1 opened 6 years ago
hm, looks like a problem that will need pretty extensive digging to solve…I'll see if i can find the time :worried:
I just found a slightly different variation on this in case it helps the investigation https://github.com/fthomas/refined/issues/556
The interesting thing that I found there was that it works for compile but not for generating docs.
Comparing the output with -Ymacro-debug-verbose
showed that for some reason when generating docs it prints "looking for macro implementation: macro method autoRefineV" twice but only once for compile.
I found that it also occurs on the eu.timepit.refined.macros.RefineMacro#implApplyRef
macro (macro method apply). See https://github.com/fthomas/refined/issues/556 for the specifics.
What I did notice this time is that when it fails it is actually expanding the macro twice.
unfortunately, I am unable to reproduce the problem with any of the test cases specified in those issues. I assume this is just another incarnation of https://github.com/tek/splain/issues/4 :disappointed:
Just want to point out that we don't have a test template for REPL or ammonite or scalaCLI at the moment.
I'll figure it out eventually, but before that, please include your full error stack trace in your bug report.
I recently stumbled upon a weird interaction between this plugin and refined.
The problem is referenced in a comment of this issue.
To put it simply, when splain is active, the macro expansion from refined start failing (with a weird
ClassCastException
) when used in the REPL (but everything works fine in regular compiation).To reproduce the problem, one can define the following
build.sbt
and past the following lines in the console: