greg
2021-11-20 13:42:03

A minimal example would be awesome if you can.


greg
2021-11-20 13:42:50

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?


greg
2021-11-20 13:46:02

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.


greg
2021-11-20 13:48:21

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.


greg
2021-11-20 13:59:58

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))


greg
2021-11-20 14:01:29

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?


badkins
2021-11-20 16:04:17

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


badkins
2021-11-20 16:05:56

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


badkins
2021-11-20 16:07:05

FYI - Hovering in DrRacket didn’t produce anything.