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
deno check
cache causes wrong results
#18516
Comments
This looks like a TS 5.0 buildinfo bug. cc @dsherret |
You can temporarily work around this by providing the |
I guess for folks running into this, try |
Should be fixed now in 1.32.3 |
Summary
The cache used by
deno check
can lead to incorrect results reported. Runningdeno check app.ts
a second time will just return the previous result, even though the types of local modules thatapp.ts
depends on have been corrected.Reproduction
Given the files:
and:
deno check
gives the expected error:If we fix
_greet.ts
to take aname: string
,deno check
should now pass, but we still get the same error.You can work around this by running
deno check --reload app.ts
, but there are two big problems with this:First: For large projects, this can result in re-downloading quite a large dependency tree with every run of
deno check --reload
.But more importantly, you have to first know that you're getting the wrong results to know to go look for
--reload
. If you run into the caching problem from the other direction (i.e.: you cached a "pass", which should now be failing),deno check
is giving you a dangerous result. You think your build is good and you push it out, only to run into runtime errors that TypeScript should've saved you from.Possible fixes?
Maybe when
deno check
caches its results, it can save the graph of local dependencies checked. Then, the nextdeno check
will only use the cache if none of those local dependencies have changed.The text was updated successfully, but these errors were encountered: