jeapostrophe / racket-langserver

Other
262 stars 24 forks source link

require/typed marked as "unused require" #128

Closed mode89 closed 9 months ago

mode89 commented 9 months ago

Hi :)

In typed/racket, require/typed and unsafe-require/typed marked as unused require, even though all of the imported definitions are actually referenced by the current file.

Here is an example code:

#lang typed/racket

(require typed/racket/unsafe)

(unsafe-require/typed ffi/unsafe
  [#:opaque Pointer cpointer?])

(require/typed glfw3
  [glfwCreateWindow (-> Integer Integer String Pointer Pointer Pointer)])

(glfwCreateWindow 640 480 "My Window" (assert #f cpointer?) (assert #f cpointer?))
dannypsnl commented 9 months ago

These are raised from drracket, and actually need typed-racket provide reference information, cannot be fixed here.

mode89 commented 9 months ago

These are raised from drracket

I use neovim and vim/ale.

6cdh commented 9 months ago

This project uses drracket's library for diagnosis, so we can't fix it here. It should be reported to drracket. Sorry for the inconvenience.

mode89 commented 9 months ago

Oh, I see. Thanks :)

mode89 commented 9 months ago

By the way, is there any way of disabling a warning on a specific line, perhaps through inline comments, like in pylint?

6cdh commented 9 months ago

no