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
When loading a cache, rubocop should let the user know #8842
Comments
Seems reasonable to me, WDYT @bbatsov ? |
I don't think this belongs to a formatter, but we can output the information somewhere. As the cache was meant to be transparent I'm leaning towards showing some message only in debug mode. |
@bbatsov Does this seems reasonable than? |
* When rubocop is ran in debug mode (`--debug`) and rubocop uses a cache, output the location of cache used. (This is to inform about possible differences between runs..) * Encourage users submitting bugs to use debug mode.
Is your feature request related to a problem? Please describe.
As a user that tried to debug an issue #8804, and I'm guessing #8755
I was surprised to learn that rubocop has a cache.
The behaviour and code path using the cache is different in some way, even if it's just due to code bugs
It might only be a debugging concern and not a normal golden path, but so is the cache path itself optimising..
It might improve issue reporting, handling and testing as it would be obvious in the output.
I think it's common to announce when cached is used in other utilities, but I can't at the moment name particular examples.
Describe the solution you'd like
Output a line at least in the default formater when cache is successfully loaded, indicating something like
Probably as the first line before the normal output.
I don't think formaters like json actually need it, but it can become an attribute in the summery if that makes more sense to be good cross formaters...
Describe alternatives you've considered
An alternative would probably to only add it to the
--debug
option, but than I'd recommend that would come with updating the issue template to run and paste an output with that.Or just have running with no cache
-C false
in the issue submission as the MVP..Additional context
This is an example of a bug I think I found with the caching, where it doesn't save the issue status as it was discovered, it saves a hard-coded value
https://github.com/rubocop-hq/rubocop/pull/8841/files
The text was updated successfully, but these errors were encountered: