

A minimal example would be awesome if you can.

If you open the file in Dr Racket, you won’t see a strikeout effect, but if you hover the mouse pointer in the same areas, do you see the “no bound occurrence” message?

My guess is that there probably are unused definitions, somewhere. Obviously not where it’s being annotated there in your file. Somehow the srcloc is being garbled or misapplied, either at the drracket/check-syntax level or by me.

Like, maybe there’s truly an unused definition in some file bar.rkt
at position [13 15), and that’s reported correctly, but somehow the annotation is ending up drawn in the buffer for foo.rkt
.

I do “filter” the annotations to just those whose syntax-source
= that of the file being checked (define/override (syncheck:find-source-object stx)
(and (equal? src (syntax-source stx))
src))

I guess another theory is that include-template
is causing things like syntax-position
and syntax-span
to be from the template file instead of adjusted to the containing/using file? Or something like that?

Thanks @greg that’s helpful - I’ll explore some of that, and if I come up blank, put together a tiny reproducible example.

Weird - I opened in DrRacket, then clicked “check syntax” and got a DrRacket internal error! send: target is not an object
target: #f
method name: last-position
context...:
/Users/badkins/sync/github/racket/racket/collects/racket/private/class-internal.rkt:4681:0: obj-error
/Users/badkins/sync/github/racket/racket/share/pkgs/drracket/drracket/private/syncheck/gui.rkt:1140:12: add-to-range/key method in make-syncheck-text%380
/Users/badkins/sync/github/racket/racket/share/pkgs/drracket-tool-lib/drracket/private/syncheck/traversals.rkt:1039:0: annotate-counts
/Users/badkins/sync/github/racket/racket/share/pkgs/drracket-tool-lib/drracket/private/syncheck/traversals.rkt:48:10: expanded-expression
/Users/badkins/sync/github/racket/racket/share/pkgs/drracket/drracket/private/syncheck/gui.rkt:2535:27
/Users/badkins/sync/github/racket/racket/share/pkgs/drracket/drracket/private/syncheck/gui.rkt:2557:8: with-lock/edit-sequence method in unit-frame-mixin
/Users/badkins/sync/github/racket/racket/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:435:6
/Users/badkins/sync/github/racket/racket/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:486:32
/Users/badkins/sync/github/racket/racket/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:634:3

FYI - Hovering in DrRacket didn’t produce anything.