stride
stride copied to clipboard
Add basic F# support
PR Details
With these changes F# projects are compiled and included in the solution tree. This allows to have F# projects which are the startup project and automatic recompilation as soon as the source files changed.
Besides, original changes were from @Zeroto, however I had to edit the fork from him to get the F# support up and running again with the latest .NET version. There have been some changes since .NET 5.0.2xx, which required to declare the env var DOTNET_HOST_PATH
. Without that the F# compilation fails, because the F# targets build on that this env var is existent.
I applied that "fix" based on these insights here. https://github.com/ionide/proj-info/pull/100 https://github.com/ionide/ionide-vscode-fsharp/issues/1509
Related Issue
#781
Motivation and Context
I like to be able to code my game in F# too, with this I have at least minimal engine support for F#.
Types of changes
- [ ] Docs change / refactoring / dependency upgrade
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x] My change requires a change to the documentation.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
Absolutely cool! Does the editor loads referenced projects too?
@ykafia Glad to see you like it 😃
Dependencies of the F# project are displayed. However I'm just getting into enhancing all changes, because I spend most of my time fixing that annoying DOTNET_HOST_PATH
bug 😅
Hey folks, this is ready for a review.
I would be very happy to get input what is necessary to get this merged.
Thanks, this improvement is very welcome!
I was thinking that it would be good to create a file in Stride.Core.Assets
that contains the list of languages with all required attributes (file extension, etc.).
You could create a custom structure/class so that it's easier to declare, i.e.
SupportedLanguages = new SupportedLanguage[]
{
{
Name = "C#",
Extension = ".csproj",
}
}
The idea would be then to only have to maintain this specific file and stop hardcoding ".csproj" all over the places. Of course, the Visual Studio extension changes can be dealt with separately (it's optional and require more specific changes).
Thank you, I'm very happy to hear you're open for this improvement! :)
Unfortunately I have some bad news. I spend the last days trying to get a template running with F# and always run into the problem that the resulting window is black. Even worse, I ran out of ideas what the problem could be. Do you folks have some idea why and how that could happen?
Do you have a test project for it ?
@VaclavElias and @ZZAAAKK are currently looking into reviving this.
Yeah, I suggested to do a separate PR where we will take only some bits from this PR, including the advise about the SupportedLanguage
class.
@realvictorprm are you still around to finalise this? The box in F# arrived :)
Should this be closed?
Let's close. A new PR should be done to make further adjustments so F# can work also outside of code-only approach.
Closing, as it needs to be redone.