-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Error With Async Linting when opening/reloading brackets with a preopen file #7459
Comments
This get logged when an async linting provider is invoked before its previous invocation on the same file has been finished. That seems to happen especially often when initially opening a project, because preferences change events tend to stack up and cause linting to get run twice in a row. But it could also happen e.g. by rapidly switching away from and then back to a specific file. The warning is harmless, but we shouldn't spam the logs in cases like these where the provider is doing nothing wrong. |
CC @busykai |
Yep. Actually the same thing happens each time a measurement is re-entered (e.g. opening a big file and quickly switching to another it would logged from file open). It's not specific to linting. I'll take a look at PerfUtils to see what can be done. |
Seems like there are at least these two options:
|
marked needs review |
Low priority - hey @busykai - please propose how to fix this and feel welcome to go ahead with this. |
@busykai Fwiw I don't think it happens with simple file-open flows, because the PerfUtils string is unique for each file path. The issue is only cases where two overlapping measurements have the same exact string, which is happening with linting. |
@peterflynn you're right, it wouldn't happen if you switch once, but if you switch back it will. i'm not talking about regular use cases, but things like opening huge binary files in Brackets. at any rate, i think linting could well do the same as file open -- make a measurement specific to file, but it still needs a change in perfutils for a cleaner fix (especially if we want to tolerate service-based linters). to address that, i like your second option. |
Oh, another option I thought of a while back (albeit in a different context) -- create an API that ties a PerfUtils measurement directly to a Promise. This removes the need for a unique string as well, and should be less error-prone (and fewer lines of code) for clients of the API. |
any news on this issue? I have the same errors in console and I don't know if I should do something or not..
|
Sorry, I was on a [probably too] long vacation will try to get to this ASAP. |
Fix #7459 -- allow parallel timers of the same name.
Confirmed. Closing. @fdecampredon @FezVrasta This is fixed for Release 1.1 |
I have created a typescript 'async' linter, If I open brackets with a typescript file open, the following error are output in my console :
The text was updated successfully, but these errors were encountered: