(draft) Change signature of macro-based chisel3.Bits.unary_~ to fix IntelliJ highlighting issue#4611
(draft) Change signature of macro-based chisel3.Bits.unary_~ to fix IntelliJ highlighting issue#4611unkarjedy wants to merge 1 commit intochipsalliance:mainfrom
chisel3.Bits.unary_~ to fix IntelliJ highlighting issue#4611Conversation
|
|
Same with |
|
Thanks for stopping by! We've know about this issue for a long time, but thought it was only fixable with an IntelliJ plugin or something. I think @sequencer might use a plugin for his team but generally speaking it's just been kind of lingering.
If that works, that would be amazing, I don't use IntelliJ but if someone who does can confirm then I am happy to roll this approach out to all of the relevant methods. |
|
Thanks for confirming @Emin017! I'll try to get to applying this fix soon across the board. |
|
Sorry for the delay response:
However we only support fixing the D/I issue with https://github.com/chipsalliance/idealchisel/blob/master/idealchisel/src/InstanceInjector.scala On the contrary, we should consider implementing a Chisel whitebox plugin that enables the dynamic modification of return types using macros (which should be attributed to the Scala 2 implicit function design). I concur that we need to enhance my plugin; it is currently on my to-do list, and I am hiring a Scala full-time developer to work on it. |
|
If you have questions while developing IJ plugin, you are welcome to ask them in our discord: |


Hello, I am from the IntelliJ Scala Plugin team
We have an error report about
~method not being resolved in IntelliJ with Scala Plugin:https://youtrack.jetbrains.com/issue/SCL-15350/Operators-not-recognized-chisel3-library
The method is macro-based.
It declares to return
Bits, but the macro substitutes it withUInt/Boolean/SInt.IntelliJ can't detect it because it knows nothing of the macro logic.
As I mentioned in the comment
There is a chance that this particular issue could be partially fixed by improving the method return type to use abstract type
type Self <: Bits.JFTR I know nothing about chisel details
It's a draft proposal, more for a discussion initiation...