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
Unable to get fsc working in developer Linux/OSX setup #10614
Comments
@KevinRansom this one looks odd. Any thoughts? |
I thought I'd answered this one, sorry about that. This behaviour is by design. The only reliable way to build a working coreclr app is by using the DotNET Sdk. the ```fsc program.fs```` build gesture doesn't work reliably. The reason for this is that computing the references and producing the correct runtime outputs are not built into the compiler. The compiler takes inut files and produces output files, adapting to different platforms is the work of the Sdk. It would be fair to say that we take a pretty good crack at some of this work in fsi.exe, but we still rely on the sdk for doing most of that work. On Linux the dotnet sdk has a way of locating the desktop binaries so wrap your build in an fsproj. |
I thought I am already using dotnet by invoking |
@Swoorup you are missing about a million lines of msbuild and nuget code as well as the sdk props ,targets and proj files. The command line for a simple hello, world processed by the dotnetsdk looks like, and this still won't produce runnable code it requires the build to have put the necessary dependencies and config files in the output directory. Sure, I could probably go through and remove a ton of these lines and it would still compile, but they are all necessary to cover the main developer use case we build for. I think you'll find that C# has the exact same requirements.
|
Ouch, that would mean it's hard to test end to end changes to the compiler. Unless you decide to stick to just unit tests and fsi. |
@Swoorup, ahhahha now I'm going to let you in on my secret coreclr fsc debugging technique. A community developer @enricosada added my favourite community contribution ever, way back in 2015 or 2016, just so you know it's still my favourite. The feature was response file file support. So here is what I mostly do for debugging the coreclr F# compiler ... (Note! I expect us to do better with F5 debugging and so on in the future.)
|
Here is the response file from a default netsdk project: |
@Swoorup you could of course use linux debuggers with response files in just the same way. |
Keeping this in the backlog because we should generally have a decent contributor experience on linux machines. |
Whoops, wrong button |
Gonna close this now |
Unable to get fsc working in linux/OSX setup
Repro steps
Provide the steps required to reproduce the problem:
./build.sh
printfn "Hello World
usingThe fsi executable works without any issues however. I believe this is due to missing .net 472? But I can't find a workaround. Release build has the same issue
Expected behavior
Compiler built from source should be able to compile fs scripts
Actual behavior
Error as observed above.
Known workarounds
None
Related information
Provide any related information (optional):
The text was updated successfully, but these errors were encountered: