Ionide-vscode-fsharp: Referencing a .fs file in a different folder kills all hints & intellisense

Created on 3 Dec 2017  路  9Comments  路  Source: ionide/ionide-vscode-fsharp

The following script, test.fsx does not show any intellisense, tooltips or code lenses:

#load "../foo.fs"

let x = 5

Assume that foo.fs is a file living in the folder directly above the script. It doesn't matter if the code in foo.fs is valid or not.

weird

There are two "workarounds" I have found that fixes the issue:

  1. Move foo.fs to the same folder level as test.fsx.
  2. Renaming foo.fs to foo.fsx.

However, neither are viable solutions when e.g. working with file dependencies sourced from paket.

bug language services up for grabs

All 9 comments

I have been having the same issue for the last few versions.

My workaround is to include the project's root folder with an absolute path:
#I "C:/Source/ProjectA"

Then I can reference packages and load .fs-files with intellisense still working:

#r @"packages\FSharp.Data\lib\net45\FSharp.Data.dll"
...

#load @"Reporting\src\MetaData.fs"
...

Maybe something has changed since this was reported, but I'm experiencing this issue with a .fsx loading a .fs in the very same directory, either by using just the filename or a relative path.

Using an absolute path fixes the issue.

@turbohz I'm noticing it now for .fsx files even with absolute paths :-(

Ignore that last message - that was because the referenced .fsx file had a relative #load in it.

Pinging this as it's quite old - just wondering if anything has changed in the ecosystem in this time to fix it - or if not, what steps are required to solve it?

@Krzysztof-Cieslak in new Ionide 4 world, is there any chance that this is "fixable"? :-)

This seems to be working for me

image

Or not

Fixed in FSAC, will be in next Ionide release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cartermp picture cartermp  路  4Comments

sergey-tihon picture sergey-tihon  路  6Comments

draganjovanovic1 picture draganjovanovic1  路  3Comments

isaacabraham picture isaacabraham  路  5Comments

gsomix picture gsomix  路  6Comments