sorawee / fmt

A code formatter for Racket
Other
72 stars 6 forks source link

Error: `#%declare`: not an allowed declaration keyword? #53

Closed jaybonthius closed 6 months ago

jaybonthius commented 6 months ago

I'm getting this error on running raco fmt <my_file>.rkt. Any idea what the issue is?

/root/.local/share/racket/7.9/pkgs/pretty-expressive/core.rkt:5:11: #%declare: not an allowed declaration keyword
  at: #:unsafe
  in: (#%declare #:unsafe)
  location...:
   /root/.local/share/racket/7.9/pkgs/pretty-expressive/core.rkt:5:11
  context...:
   /usr/share/racket/collects/racket/require-transform.rkt:269:2: expand-import
   /usr/share/racket/collects/racket/private/reqprov.rkt:505:5
   /usr/share/racket/collects/racket/require-transform.rkt:269:2: expand-import
   /usr/share/racket/collects/racket/private/reqprov.rkt:266:21: try-next
   /usr/share/racket/collects/racket/private/reqprov.rkt:243:2: require
   /usr/share/racket/collects/syntax/wrap-modbeg.rkt:46:4: do-wrapping-module-begin
   /usr/share/racket/collects/racket/require-transform.rkt:269:2: expand-import
   /usr/share/racket/collects/racket/private/reqprov.rkt:584:5
   /usr/share/racket/collects/racket/require-transform.rkt:269:2: expand-import
   /usr/share/racket/collects/racket/private/reqprov.rkt:266:21: try-next
   /usr/share/racket/collects/racket/private/reqprov.rkt:243:2: require
   /usr/share/racket/collects/syntax/wrap-modbeg.rkt:46:4: do-wrapping-module-begin
sorawee commented 6 months ago

As indicated in the documentation, you need Racket 8.0 or newer to use fmt. You are currently using 7.9. Could you try a newer version and see if the issue is resolved? (The current version of Racket is 8.12 -- 7.9 was 3 years ago)

jaybonthius commented 6 months ago

Oh shoot, my bad. Thanks for the prompt response.