You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First let me thank you for this amazing plugin. Being able to deconstruct values and weaves implicit in for-comprehension is a game changer.
I'm using this plugin to power up the main function of my application. As such, there are a lot of straight assignments (dependencies) in it. I found out that, if there are 22 or more assignments consecutively, the plugin start to reuse variable name in the rewritten code. For example:
[error] Hello.scala:6:5: not found: value x$1
[error] v1 <- Some(1)
[error] ^
For now we bypassed the issue by inserting an artificial <- in the middle of the assignment list, but having to explain why this no-op flatMap is present is a bit confusing :)
22 reminds me of the tuple limit, so maybe there isn't much that can be done to fix this issue. But I though reporting it for others to see would not be a bad idea.
The text was updated successfully, but these errors were encountered:
I wound one more "workaround" - add implilcit0(useless: Int) = 42 somewhere in middle of xXX vals - creates virtual "block", which allows to compile code, similar as extra flatMap created by <-
Generated code is using TupleX as "closure" - seems that unwrapping of values has some problem
Hello there,
First let me thank you for this amazing plugin. Being able to deconstruct values and weaves implicit in for-comprehension is a game changer.
I'm using this plugin to power up the
main
function of my application. As such, there are a lot of straight assignments (dependencies) in it. I found out that, if there are 22 or more assignments consecutively, the plugin start to reuse variable name in the rewritten code. For example:will fail to compile with the error
For now we bypassed the issue by inserting an artificial
<-
in the middle of the assignment list, but having to explain why this no-opflatMap
is present is a bit confusing :)22 reminds me of the tuple limit, so maybe there isn't much that can be done to fix this issue. But I though reporting it for others to see would not be a bad idea.
The text was updated successfully, but these errors were encountered: