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

Not Recognizing F# Project Inside Workspace With Flutter #1976

Open
MelbourneDeveloper opened this issue Jan 9, 2024 · 6 comments
Open

Not Recognizing F# Project Inside Workspace With Flutter #1976

MelbourneDeveloper opened this issue Jan 9, 2024 · 6 comments

Comments

@MelbourneDeveloper
Copy link

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.

ionideissue.mov

Machine info

  • OS: Mac
  • .NET SDK version: 8
  • Ionide version: v7.16.1
@vzarytovskii
Copy link

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

@baronfel
Copy link
Contributor

@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.

@vzarytovskii
Copy link

@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.

@MelbourneDeveloper
Copy link
Author

@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
Copy link
Author

@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"
	}
}

@baronfel
Copy link
Contributor

@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.

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

No branches or pull requests

3 participants