Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-exhaustive dependency warning #28

Open
lilactown opened this issue Feb 24, 2020 · 0 comments
Open

Non-exhaustive dependency warning #28

lilactown opened this issue Feb 24, 2020 · 0 comments
Labels
enhancement New feature or request hooks Having to do with React Hooks

Comments

@lilactown
Copy link
Owner

lilactown commented Feb 24, 2020

defnc should detect if dependencies are exhaustively filled in, and if not signal a compiler warning. It could be silenced by filling in the dependencies or annotating with metadata.

;; Warning! Non-exhaustive dependencies
(use-memo
 [foo]
 (+ foo bar))

;; Ignore specific dependency in the body
(use-memo
 ^{:ignore-deps [bar]} [foo]
 (+ foo bar))

;; Don't warn ever
(use-memo
 ^:ignore-deps []
 (+ foo bar))
@lilactown lilactown added the hooks Having to do with React Hooks label Feb 25, 2020
@lilactown lilactown added the enhancement New feature or request label Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hooks Having to do with React Hooks
Projects
None yet
Development

No branches or pull requests

1 participant