ionide-vscode-fsharp icon indicating copy to clipboard operation
ionide-vscode-fsharp copied to clipboard

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

Open nhirschey opened this issue 3 years ago • 6 comments

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:

  • https://github.com/ionide/ionide-vscode-fsharp/issues/1519
  • https://github.com/ionide/ionide-vscode-fsharp/issues/1498
  • https://github.com/ionide/ionide-vscode-fsharp/issues/1236#issuecomment-725891973

nhirschey avatar Apr 12 '21 10:04 nhirschey

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:!

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.

baronfel avatar Apr 12 '21 12:04 baronfel

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

  • The issue with access in paths: https://github.com/ionide/ionide-vscode-fsharp/issues/1519

image

  • Turning to the present issue about userprofile, the fsiExtraArgs allows ionide to find the .nuget dlls. There are no longer any problems, as shown in this screenshot. However, intellisense still does not work. In this screenshot, aFirst. should show me csv fields. image

nhirschey avatar Apr 12 '21 12:04 nhirschey

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

baronfel avatar Apr 18 '21 18:04 baronfel

@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 avatar Apr 19 '21 09:04 nhirschey

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

nhirschey avatar Apr 19 '21 10:04 nhirschey