resyntax
resyntax copied to clipboard
Contract violation when given a non-installed package
The --package option uses pkg-directory, which returns #f when no such package is installed. In turn, this triggers a contract violation from simple-form-path. For example,
$ resyntax analyze --package no-such-package
simple-form-path: contract violation
expected: path-string?
given: #f
context...:
....
Hmm. Yeah that's not ideal. There's two options:
- Make
--packageinstall the package when it's not already installed - Make
--packageerror with a much better error message when the package isn't installed.
I lean heavily towards 2, on the basis that I don't think resyntax should change the state of your installation (beyond resyntax fix making the changes it suggests).