-
Notifications
You must be signed in to change notification settings - Fork 1.4k
.babelrc settings cached inappropriately #872
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
Comments
Perhaps we should include the |
I have no babel section. Unless of course you mean the dependencies in which case I've updated the original post |
Yea for this to work properly we'd have to resolve the Babel config and use that as part of the salt for the cache. Alternatively we could print warnings when we detect Babel config inheritance/extension, with instructions on how to clear the cache. |
@novemberborn I think even a warning/instructions would be a good first step. I was removing my node_modules and changing a bunch of things back and forth for a while, not knowing what I actually had done wrong or right. |
I think this is a good argument for moving cache top level ( |
@jamestalmage makes sense. Or a CLI command to wipe it? Note that the cache salt already includes the entire |
@jamestalmage I don't think that will help much. You ignore the cache directory when adding AVA to a project and then forget. Later you experience a cache bug or another team member experiences it, and neither realizes it's a cache issue. Instead, I think we should do a good job as possible to hash correctly, even Babel config chains, and when it's absolutely not possible, print a warning. We could maybe also improve the documentation about clearing the cache on issues (even in the issue_template.md) and add a |
I must say this was great source of frustration for me as well. At certain point I was sure that my config is correct, but tests runs were still saying it's wrong all over again. I ended up disabling cache while I was configuring when I found out about it. Perhaps disabling cache by default might be another way to this and add there a warning that cache is disabled and how to enable it to improve performance. That way you are making user aware that cache is there. Sounds better to me then trying to cover whole babel configuration chain. |
AVA should be fast out of the box and not require more configuration in order to improve performance. And as @sindresorhus said regarding moving the cache directory next to the
So let's focus on:
|
It won't be easy https://phabricator.babeljs.io/T6709 |
So, for those of us stuck with this issue in the meantime, how would one clear the cache manually? |
@jescalan |
@novemberborn on the latest version, |
@jescalan could you share what changes you're making that are not causing test files to be recompiled? |
Closing due to inactivity. |
Uh oh!
There was an error while loading. Please reload this page.
I was going through the code coverage docs noticed that adding some of the params to my
.babelrc
file, I would get the error below when running tests:The thing is, changing my
.babelrc
file back to a simple config below and re-testing, it still failed:Clearing the
node_modules
folder fixed things it seemed. I thought maybe it was related to this so I started looking for cache problems. I noticed when I clear out thenode_modules/.cache/ava/
folder and re-test with my simple.babelrc
file, the error goes away and tests run fine.AVA portion of package.json
Dependencies:
Version info:
The text was updated successfully, but these errors were encountered: