Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Find in Files causes console to get filled up with messages from LanguageManager #3146

Closed
redmunds opened this Issue · 13 comments

6 participants

@redmunds
Collaborator

Executing Find in Files on brackets/src folder causes a hundred or so messages to get written to console log. For example:

Called LanguageManager.getLanguageForPath with an unhandled file extension: png
/C:/Users/redmunds/github/brackets-shell/Release/dev/src/language/LanguageManager.js:200

This doesn't seem critical enough to flood the console.

@TomMalbran
Collaborator

I've been working on Find in Files improvements, and of them solves this by using the file instead of the document. I'll pull a request later since I want to add one more thing first.

@redmunds
Collaborator

I think the document in memory is used (as opposed to the file on disk) so you can search unsaved changes, so verify that isn't broken with any proposed solution.

FYI, I think we can simply remove that console.log() statement. At most we can isolate it to when user explicitly opens a file.

@TomMalbran
Collaborator

Right I haven't thought of that, will go back to how it was, and check if could be removed when searching.

@lkcampbell
Collaborator

@TomMalbran what sort of changes are you making? I have an interest in working on Find in Files as well and I'd like to help out. Contact me at my gmail account, same user name as here, if you would like to discuss further.

@TomMalbran
Collaborator

Mostly, everything from this card Trello card, plus a few extras. Only thing missing would be some sort of file filter, but wasn't sure how to make it yet. Maybe it could be a simple predefined file types for now, which can then be moved to the preferences.

@TomMalbran TomMalbran referenced this issue
Closed

[PM] Lots of Find in Files improvements #3151

9 of 11 tasks complete
@TomMalbran TomMalbran was assigned
@DennisKehrig DennisKehrig was assigned
@njx
Owner

Reviewed. @TomMalbran - in addition to the other fixes you're doing in that pull request (which we might not land right away), I think we generally just want to get rid of this console log immediately, since it doesn't seem like it ought to print out to the console just because LanguageManager is asked about a file it can't deal with. @DennisKehrig - could you just take out this console log if it makes sense? Thanks.

@TomMalbran
Collaborator

Sure, I understand. My idea was mainly to try to skip several unneeded steps while opening a file to search, which at the same time stopped many of the console errors, but the console can still show many errors if you keep opening not supported languages.

@DennisKehrig
Collaborator

Sure, I'll take it out. If I remember correctly it was the successor to another console message regarding file extensions for which we did not define a mode - but that would only have been printed when trying to open a file in an editor, not just when the Document is created.
Should we also consider making language lazy loaded again? This would also have prevented the console spam.

@DennisKehrig
Collaborator

Took it out in #3052. Would create a new pull request, but I want to wait with this until #3164 is sorted out. Feel free to file a dedicated pull request yourself though and assign it to, I'll happily merge it!

@DennisKehrig
Collaborator

Pull request is up!

@DennisKehrig
Collaborator

Removed in #3285 instead

@jbalsas
Collaborator

FBNC @redmunds

@redmunds
Collaborator

Confirmed. Closing.

@redmunds redmunds closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.