Skip to content
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

[CLOSED] Remove normalizeFilename function #11152

Open
core-ai-bot opened this issue Aug 30, 2021 · 8 comments
Open

[CLOSED] Remove normalizeFilename function #11152

core-ai-bot opened this issue Aug 30, 2021 · 8 comments

Comments

@core-ai-bot
Copy link
Member

Issue by ficristo
Friday Mar 03, 2017 at 18:22 GMT
Originally opened as adobe/brackets#13147


Quick hack for adobe/brackets#12744, I doubt this is the correct way to fix.
I am only interested to see if this could solve the crashes people are experiencing.

/cc@zaggino


ficristo included the following code: https://github.com/adobe/brackets/pull/13147/commits

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Friday Mar 03, 2017 at 19:05 GMT


This construct

var fileName = fileInfo.name;
if (ternServer.projectDir && fileName.indexOf(ternServer.projectDir) === -1) {
  fileName = ternServer.projectDir + fileName;
}

repeats itself if I have counted right and not missed any difference 5 times over the diff, perhaps

function getNormalizedFilename(fileInfo, ternServer) {
  return ...
}

and use var fileName = getNormalizedFilename(fileInfo, ternServer); would be a bit nicer

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Friday Mar 03, 2017 at 19:07 GMT


Sure! If this fixes the crashes I'll refactor like that.

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Friday Mar 03, 2017 at 19:07 GMT


Anyway, were you able to replicate anything, or is this just a hinch? If it doesn't break any tests I think we could merge this for time being as adobe/brackets#11948 doesn't seem to be moving much...

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Friday Mar 03, 2017 at 19:09 GMT


Since people reported crashes in 1.8 that weren't in 1.7, this is the only thing that comes to my mind.
So yes, this is only an hinch...
The tests pass.

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Friday Mar 03, 2017 at 19:12 GMT


I have a project which, while working on it, definitely crashes Brackets, but I can't replicate this. Sometimes after 5 minutes, sometimes after an hour. So it'd vote the approach of merging it and seeing if there's any change in the reports.

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Saturday Mar 04, 2017 at 17:29 GMT


Refactored. After running tests again, they are quite flaky. But I'm not sure if it is because our testsuite or because my PR...

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Monday Mar 06, 2017 at 02:04 GMT


Hi@ficristo , I've run the tests and they all pass on my machine so that thing is fine.
Just one minor thing (commented above) and I'd merge this if nobody doesn't want to add anything.

@core-ai-bot
Copy link
Member Author

Comment by zaggino
Monday Mar 06, 2017 at 20:15 GMT


👍

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

No branches or pull requests

1 participant