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

Document --check #20

Closed
thheller opened this issue May 20, 2017 · 2 comments
Closed

Document --check #20

thheller opened this issue May 20, 2017 · 2 comments

Comments

@thheller
Copy link
Owner

--check is very useful for finding missing externs in any build.

CLOSURE-WARNING: shadow/cljs/npm/cli.cljs[7:12] (compiled to shadow/cljs/npm/cli.js[8:79])
	Property statSync never defined on shadow.npm.fs

CLOSURE-WARNING: shadow/cljs/npm/cli.cljs[53:13] (compiled to shadow/cljs/npm/cli.js[97:165])
	Property existsSync never defined on shadow.npm.fs

CLOSURE-WARNING: shadow/cljs/npm/cli.cljs[54:4] (compiled to shadow/cljs/npm/cli.js[99:143])
	Property mkdirSync never defined on shadow.npm.fs

Used it to find all the :externs required for the shadow.cljs.npm.cli script.

Also useful since it does type checking but given that CLJS is mostly untyped it only finds errors in the Closure lib or when using typed :externs. Given that these are mostly incorrect --check may actually just confuse more than help.

Also should probably talk about how people are doing :externs wrong.

@thheller
Copy link
Owner Author

Refactored the warning code so it now also generates pretty warnings for --check.

screen shot 2017-06-15 at 19 57 19

The message isn't 100% ideal and column information is missing but it is better than before.

@thheller
Copy link
Owner Author

Turns out that check is super unreliable in many cases. It's still in there but might report so many false positives that it might confuse more than actually help.

Should rely on better externs inference instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant