ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
859 stars 277 forks source link

Typechecking and intellisense does not work if the windows user account name has an accent. #1520

Open nhirschey opened 3 years ago

nhirschey commented 3 years ago

Describe the bug**

The general issue is that ionide does not handle unicode characters in strings properly. This particular bug report however highlights a severe issue caused by this bug.

Create a user account with an accent in the name. Then try to do something. Ionide tries to read the path to the .nuget folder at c:\users\accountname\.nuget but it cannot handle the accent, so it fails and there is no type checking of the file.

This is a pretty big accessibility issue. As a practical matter, it means that new developers who have an accent in their name cannot use ionide.

Example: image

This is another symptom of the accent in strings problem. Other issues reporting the same bug in different settings:

open-collective-bot[bot] commented 3 years ago

Hey @nhirschey :wave:,

Thanks for backing our project. If possible, We will handle your issue with priority support. To make sure we don't forget how special you are, we added a backer label to your issue.

Thanks again for backing us :tada:!

baronfel commented 3 years ago

Thanks for this!

Big note here for triage/my notes is that this is specifically for the FSI integration, not a more generally widespread issue.

nhirschey commented 3 years ago

FYI, turns out that the fsiExtraParameters fix in https://github.com/ionide/ionide-vscode-fsharp/issues/1236#issuecomment-725891973 fixes:

image

baronfel commented 3 years ago

Can you retest with 5.5.0 or greater? we changed the set of parameters passed to FSI to hopefully address this.

nhirschey commented 3 years ago

@baronfel, this is fixed! I verified that the fix correctly deals with accents in folder paths in 5.5.2. My Portuguese students learning F# will be quite grateful.

nhirschey commented 3 years ago

Sorry, I spoke too soon. This is not fixed. I tested fsi but I forgot to test intellisense. Intellisense is still broken.

See this screenshot created on my dummy account that has an accent. Ionide does not know that a has type CsvProvider and that aFirst has type CsvProvider.Row. If you look at the verbose logs, it appears that internally the accent in Pérez is still causing problems for ionide.

image

Here's the info from my accented test user account: PS C:\Users\Pérez\Downloads> dotnet --version 5.0.200 Ionide version 5.5.2 (see screenshot) Version: 1.55.2 (user setup) Commit: 3c4e3df9e89829dce27b7b5c24508306b151f30d Date: 2021-04-13T09:35:57.887Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042

For a sanity check, here is the same from my normal user account on the same PC that does not have an accent: image

Info for normal account: C:\Users\nicho> dotnet --version 5.0.200

Version: 1.55.2 (user setup) Commit: 3c4e3df9e89829dce27b7b5c24508306b151f30d Date: 2021-04-13T09:35:57.887Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042