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

Not Recognizing F# Project Inside Workspace With Flutter

Open MelbourneDeveloper opened this issue 1 year ago • 7 comments

Describe the bug

I have a vscode workspace with some Flutter, C# and F# projects. The C# and F# projects are sitting in a folder named dotnet under the same solution. The workspace only includes the dotnet folder. It doesn't include the solution at the root level. Ionide doesn't pick up the F# projects unless I remove the Flutter folders from the workspace.

Steps to reproduce

I cannot consistently reproduce this problem in a blank sample. I tried creating a vscode workspace with VS Solution, and a Flutter app. The first few times, the Ionide F# project didn't load, but eventually it worked ok.

See the video as evidence of what is happening. This consistently occurs with my workspace.

Expected behaviour

Ionide picks up my F# projects

Screenshots

This is what I see in my F# project. Bear in mind that I don't get this problem if I remove the Flutter folders from my workspace:

image

Notice that syntax errors don't cause problems at the vscode level:

image

When I remove these two folders from the workspace, the F# project correctly loads:

image

After removal:

image

Video - You Can Clearly See The Issue Here

Here is a video that demonstrates the issue, and the workaround. Note that I had to modify the workspace twice for the F# project to eventually load.

https://github.com/ionide/ionide-vscode-fsharp/assets/16697547/812f14cd-18d6-4ed5-b47f-40ce2d5b650b

Machine info

  • OS: Mac
  • .NET SDK version: 8
  • Ionide version: v7.16.1

MelbourneDeveloper avatar Jan 09 '24 23:01 MelbourneDeveloper

I remember @baronfel mentioning that Ionide doesn't fully support workspaces.

vzarytovskii avatar Jan 10 '24 00:01 vzarytovskii

@MelbourneDeveloper can you try setting https://ionide.io/Editors/Code/options.html#fsharpworkspacepath to point specifically at your solution/project that you'd like to load? If you set that, Ionide doesn't try to do any inference to find your setup - it just loads that solution/project explicitly.

@vzarytovskii is right that we don't support workspaces. We have a quite old issue about this that we need to solve, but to be honest I've never used them.

baronfel avatar Jan 10 '24 00:01 baronfel

@MelbourneDeveloper can you try setting https://ionide.io/Editors/Code/options.html#fsharpworkspacepath to point specifically at your solution/project that you'd like to load? If you set that, Ionide doesn't try to do any inference to find your setup - it just loads that solution/project explicitly.

We do that explicitly for the FCS, works like a charm.

@vzarytovskii is right that we don't support workspaces. We have a quite old issue about this that we need to solve, but to be honest I've never used them.

Yeah, same, I tried once but found it quite distracting tbh, but we have a one language solution, so a different use-case perhaps.

vzarytovskii avatar Jan 10 '24 00:01 vzarytovskii

@MelbourneDeveloper can you try setting https://ionide.io/Editors/Code/options.html#fsharpworkspacepath to point specifically at your solution/project that you'd like to load? If you set that, Ionide doesn't try to do any inference to find your setup - it just loads that solution/project explicitly.

@vzarytovskii is right that we don't support workspaces. We have a quite old issue about this that we need to solve, but to be honest I've never used them.

I'm new to F#. I don't know what I'm doing. I just added an F# project to my solution and it didn't show up in VS Code. It adds to the frustration of onboarding into a new language. You just have to know how the tooling works to discover these issues.

MelbourneDeveloper avatar Jan 10 '24 00:01 MelbourneDeveloper

@MelbourneDeveloper can you try setting https://ionide.io/Editors/Code/options.html#fsharpworkspacepath to point specifically at your solution/project that you'd like to load? If you set that, Ionide doesn't try to do any inference to find your setup - it just loads that solution/project explicitly.

@vzarytovskii is right that we don't support workspaces. We have a quite old issue about this that we need to solve, but to be honest I've never used them.

I tried adding the setting here, but it didn't fix the issue:

{
	"extensions": {},
	"folders": [
		{
			"path": "client"
		},
		{
			"path": "shared"
		},
		{
			"path": "dotnet"
		}
	],
	"settings": {
		"FSharp.workspacePath": "dotnet/PDFs.sln"
	}
}

MelbourneDeveloper avatar Jan 10 '24 00:01 MelbourneDeveloper

@MelbourneDeveloper can you try setting ionide.io/Editors/Code/options.html#fsharpworkspacepath to point specifically at your solution/project that you'd like to load? If you set that, Ionide doesn't try to do any inference to find your setup - it just loads that solution/project explicitly. @vzarytovskii is right that we don't support workspaces. We have a quite old issue about this that we need to solve, but to be honest I've never used them.

I'm new to F#. I don't know what I'm doing. I just added an F# project to my solution and it didn't show up in VS Code. It adds to the frustration of onboarding into a new language. You just have to know how the tooling works to discover these issues.

I know, and it sucks. I'm sorry. Ionide is completely OSS and community supported, however, so unless community members (or another maintainer) implement it that's what we have.

baronfel avatar Jan 10 '24 00:01 baronfel