Intellij's Junie seems to not be aware of all the ...
# arrow
d
Intellij's Junie seems to not be aware of all the nice extension functions and methods on Either... to get a Right it tries casting with as? and gets the value... and to wrap into a Right it uses it's constructor, not the .right() function... 😵‍💫. I even tried adding context7 and updating Arrow's docs on it's site... is there any way to get this to work right?
s
Hmm, it seemed to be doing that just fine when I last tried it 🤔 Is it a new project, or a project with a lot of code already? I have not noticed it misbehaving with extension functions in particular 🤔 In a small project that has at least 1 feature implemented with Arrow Junie is normally quite good at picking up the style from the project. Otherwise a
.junie/guidelines.md
might help with some specific examples of which APIs you want it to use. I personally like to keep it short and clear.
d
It's a large project that I'm refactoring... it could be a nice idea to put that in the guidelines, but even when I told it to use .right() and .getOrNull() or .isRight(), it just didn't understand and left it the way it is... maybe instead of having to try to fight with it in every project, it might be nice to give context7 enough information to help junie or maybe something else? I guess since the project wasn't using Arrow initially and I just started integrating it, it still hasn't looked at all my current usages... 🤷🏼‍♂️
Maybe those code snippets aren't comprehensive enough...
s
Just saw your Context7 message. That's kind-of a bad document. Wondering how we can improve that. We should look into it
👍🏼 1