6

I'm using Comma IDE features for the first time.

I have a very simple test file. Comma is showing warnings for the subroutines provided by the Test module with a report Subroutine X is not declared.

The tests pass fine. But I'd like to know if I have something misconfigured or if this might be a bug.

I'm using the 2022.01 version (Community Edition), Build #CT-213.5744. (jan 30, 2022) with Runtime version: 11.0.13+7-b1751.19 x86_64 and VM of Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. If it matters, the Java installed on my machine is build 1.8.0_321-b07, Version 8, Update 321.

enter image description here

enter image description here

raiph
  • 31,607
  • 3
  • 62
  • 111
StevieD
  • 6,925
  • 2
  • 25
  • 45
  • Have you tried the "restart" or "reopen" workarounds that were mentioned in the answer to the question [Subroutine `say` is not declared on Comma](https://stackoverflow.com/questions/62830990/subroutine-say-is-not-declared-on-commaide)? (The issue sounds similar, though of course `say` is part of `CORE`, and that issue was fixed, but it still seems worth a shot.) – raiph Mar 20 '22 at 11:57
  • The reddit thread [Comma plugin for IntelliJ IDEA doesn't see my modules?](https://www.reddit.com/r/rakulang/comments/syorsy/comma_plugin_for_intellij_idea_doesnt_see_my/) is about a user-defined module, and there's no direct indication of what the outcome was, but it's another example of things working but there being a bogus "is not declared" warning. Iirc the problem in 2020 (the SO) was ultimately grounded in JetBrains changing something in a breaking way and there being a lag before Edument caught up. That leads me to suggest you update your Q with Java/IntelliJ/Comma version info. – raiph Mar 20 '22 at 12:10
  • Yeah I tried reloading. Didn’t help. Update my Q? Where is that setting? I’ll google it. – StevieD Mar 20 '22 at 13:57
  • Oh the question. I just woke up. – StevieD Mar 20 '22 at 14:02
  • Welp, I tried restarting Comma again and this time it worked. So I think I'm good. – StevieD Mar 20 '22 at 14:30
  • With my self-appointed SOQ busy-body hat on, what do you think is the best thing to do? I'm thinking: ❶ Keep this Q rather than delete it because A) it seems like a good Q about a buglet that should be addressed and B) I'm currently thinking it's ultimately due to unfortunate aspects of JetBrains/IntelliJ policy toward breaking changes, and, if so, the buglet may periodically reappear even if Edument fix this latest manifestation; ❷ Give this Q an accepted answer, with you being the ideal author; and ❸ Leave this Q open in case someone has a better or worthwhile additional answer. Thoughts? – raiph Mar 20 '22 at 16:36
  • Yeah, I'll give it an answer with info for why I specualte it didn't work the first time I tried restarting. – StevieD Mar 20 '22 at 17:01

1 Answers1

3

Similar to the answer at Subroutine 'say' is not declared on CommaIde, a simple restart of IntelliJ ultimately fixed the issue.

However, initially, a simple restart did not fix the problem for me. During that first attempt, I was prompted to select the SDK again (for reasons unknown to me). So it looks to me like that whenever you select an SDK, you'll need to close and reopen IntelliJ before IntelliJ will properly load modules provided by the SDK (Rakudo/Moar VM).

StevieD
  • 6,925
  • 2
  • 25
  • 45
  • 1
    A final busy-body thought is that it would be good if you scooted a heads up email to info@commaide.com pointing to this SO. – raiph Mar 20 '22 at 17:29