cursive

grav 2025-06-19T07:11:30.718879Z

How come static analysis seems to be disabled for rich comment blocks?

grav 2025-06-22T08:47:36.049159Z

I'd love a global config option!

onetom 2025-06-24T05:51:22.787359Z

if the content of the comment block is bitrotted, then i don't see a problem with the complaints... if they are annoying, then just delete the rotten code or line-comment it. we are using rich-comments as admin interface too, so we definitely want it to be inspected, so it can be involved in code navigation, definition lookup and help.

grav 2025-06-19T07:11:35.214269Z

Rachel Westmacott 2025-06-19T07:35:50.368689Z

Where is bar def'd?

Rachel Westmacott 2025-06-19T07:36:53.280779Z

(I mean, I've definitely felt frustration with comment block handling in cursive before [https://clojurians.slack.com/archives/C0744GXCJ/p1747824307274639], but I'm not sure what you're expecting to happen in your example.)

➕ 1
grav 2025-06-19T13:19:07.012779Z

@peterwestmacott That's the deal, there's no bar - a regular form shows the right error message ("cannot be resolved"), but the rich comment seems to disable it

grav 2025-06-19T13:20:04.208299Z

I use rich comment for snippets and docs, but that breaks if I refactor the code

Rachel Westmacott 2025-06-19T13:58:26.063659Z

Oic

Rachel Westmacott 2025-06-19T13:59:30.655059Z

Have you tried 'resolve as...' > 'do' on the comment block?

Rachel Westmacott 2025-06-19T14:00:12.278289Z

(I'm afk atm)

grav 2025-06-19T14:01:18.679219Z

Just tried, didn't seem to have any effect.

cfleming 2025-06-19T22:08:27.878799Z

So, this is something that I go back and forward on enough that I might end up having a switch for it. It definitely needs to be improved from how it works now. The theory was that comment blocks may contain code which is either just invalid, or may depend on transient testing REPL state, or have once been valid but has bit-rotted, or something like that. So I turned off the inspections in the blocks so at least you wouldn't get nagged. But, subsequently I moved some functionality from annotators (which always run) to inspections (which don't run in the comment blocks), primarily so their behaviour could be configured using a consistent UI using the standard inspection config instead of having some weird Cursive-specific thing. But then some things just don't work properly in comment blocks now, in particular a lot of the auto-require/import stuff is now triggered by inspections and doesn't work in comments. So I'm tossing up between a couple of options: 1. have a global config ("Allow inspections in comment blocks") 2. have that config be per-inspection 3. run all inspections in comment blocks, and finally get around to adding disabling specific inspections, and allow that to be put on comment blocks where you don't want them. 4. something else???

👀 2