Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

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

Closed
redmunds opened this issue Mar 15, 2013 · 13 comments
Closed
Assignees
Milestone

Comments

@redmunds
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor

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

@lkcampbell
Copy link
Contributor

@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
Copy link
Contributor

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.

@njx
Copy link

njx commented Mar 18, 2013

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

Pull request is up!

@DennisKehrig
Copy link
Contributor

Removed in #3285 instead

@jbalsas
Copy link
Contributor

jbalsas commented Mar 29, 2013

FBNC @redmunds

@redmunds
Copy link
Contributor Author

Confirmed. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants