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

run ionide with .NET Core #78

Closed
2 of 7 tasks
enricosada opened this issue Jun 17, 2016 · 58 comments · Fixed by #616
Closed
2 of 7 tasks

run ionide with .NET Core #78

enricosada opened this issue Jun 17, 2016 · 58 comments · Fixed by #616
Assignees
Labels
enhancement Accepted suggestions that makes existing features better

Comments

@enricosada
Copy link
Contributor

enricosada commented Jun 17, 2016

Following twitter discussion, what's missing to run ionide with .NET Core?

If it's in the roadmap to use .netcore, otherwise just close this issue, np
I understand atm .net core seem in flux, but works, netcore is going rtm end of month.
Tooling instead it's not going to improve a lot soon, so is project.json for some time until c# start use msbuild instead of project.json, and we need time after that to use it.
But support need time, so i understand if people want to wait.

from paket.dependencies

  • ionide/ionide-vscode-helpers
  • ionide/FSharpFormatting.CLI
  • ionide/FsAutoComplete
  • fsprojects/Forge (or can be excluded for now)
  • ionide-fsgrammar
  • ... ?

@Krzysztof-Cieslak i'd like to help to bootstrap the .net core support of F# projects, but i dont know what prioritize atm after suave.

@Krzysztof-Cieslak
Copy link
Member

I guess most important is FCS and FsAutoComplete. Would leave Forge out of equation for now. Changes in plugins would be really small. Big thing is making our language services working without mono installed.

@ncave
Copy link

ncave commented Jun 17, 2016

Is adding support for the .NET Core debugger possible? That would be so awesome!

@Krzysztof-Cieslak
Copy link
Member

I think normal .Net Core debugging extension should / will work with F#.

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

FCS just needs a port of fsyacc and fslexx, but other than that it works thanks to @enricosada last night for helping me with that.

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

@Krzysztof-Cieslak Running without mono, would that just require a change to the command called by the plugin?

@Krzysztof-Cieslak
Copy link
Member

@7sharp9, yes. It should be really easy to change.

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

I started on porting fsautocomplete core, first issues are projectcracker and Fsharp.lint

@Krzysztof-Cieslak
Copy link
Member

I think we can ignore FSharpLint for now ( just comment it out). ProjectCracker is important I guess.

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

Yeah its a real pain for me working with no tools at all. :-(

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

I started it here anyway if anyone want to help out: https://github.com/7sharp9/FsAutoComplete/tree/dotnetcore
Still 15 errors relating to cracker and other stuff

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

@enricosada / @Krzysztof-Cieslak
Down to one error:

Process ID: 12564
    FSharpMethodGroupItem
is not compatible with type
    Overload
The type 'FSharpMethodGroupItem' is not compatible with the type 'Overload'
/usr/local/share/dotnet/dotnet compile-fsc @/Users/7sharp9/fsharp/FsAutoComplete/src/FsAutoComplete.Core/obj/Debug/netstandard1.5/dotnet-compile.rsp returned Exit Code 1
/Users/7sharp9/fsharp/FsAutoComplete/src/FsAutoComplete.Core/CompilerServiceInterface.fs(154,5): warning FS0044: This construct is deprecated. Renamed to TryGetRecentCheckResultsForFile
/Users/7sharp9/fsharp/FsAutoComplete/src/FsAutoComplete.Core/CompilerServiceInterface.fs(154,5): warning FS0044: This construct is deprecated. Renamed to TryGetRecentCheckResultsForFile
/Users/7sharp9/fsharp/FsAutoComplete/src/FsAutoComplete.Core/CommandResponse.fs(259,56): error FS0193: Type constraint mismatch. The type

Compilation failed.

Its hard to figure out what its complaining about?

@enricosada
Copy link
Contributor Author

projectcracker see fsharp/fsharp-compiler-docs#582 (comment)
I'll try to help with projectcracker

@7sharp9 amazing fast!

@enricosada
Copy link
Contributor Author

@7sharp9 let me check the error

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

@enricosada projectcracker is done, I just hadn't added the package via -f yet.

@enricosada
Copy link
Contributor Author

@7sharp9 has issue, it's not using the right dependencies i think, see fsharp/fsharp-compiler-docs#583
we need to use preview1 dependencies only, published on nuget. bleeding edge is bad

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

@enricosada I just used a new project then added the files from fsauto to the list.

The error here seems to be o.IsStaticArguments no longer exists, I think.

@enricosada
Copy link
Contributor Author

@7sharp9 cloning you repo atm

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

Its hard to tell, it looks like the error message form the compiler has been clipped short.

@enricosada
Copy link
Contributor Author

enricosada commented Jun 18, 2016

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

Yeah just added an array length, that must be an API change in FCS, just pushed anyway.

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

@enricosada Theres some TODO's and warnings left but it does build, ran out of time for now. fixes welcome :-)

@Krzysztof-Cieslak
Copy link
Member

Guys, try also merging ionide/FsAutoComplete#110 up to dotnetcore branch. It's version currently used by Ionide.

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

Ive ran out of time for now, if anyone gets a chance to forge ahead then that would be great.
(Or fix the TODO's or anything Ive screwed up :-) )

@enricosada
Copy link
Contributor Author

enricosada commented Jun 18, 2016

@7sharp9 i'll do a build to check in your repo

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 18, 2016

Ok, down to last error on the suave project:

/Users/7sharp9/fsharp/FsAutoComplete/src/FsAutoComplete.Suave/FsAutoComplete.Suave.fs(41,33): error FS0039: The field, constructor or member 'SetMinThreads' is not defined

After that, just the todo's.

@enricosada
Copy link
Contributor Author

I'll continue tomorrow.
Btw we should if possible do

#if NETSTANDARD1_5

Easier to merge as pr

@Krzysztof-Cieslak
Copy link
Member

I'm pretty sure SetMinThreads was due to some mono problem, it might not be needed at all with .Net Core.

Also I would like to think how to deploy it with plugin. Omnisharp team produces separate releases for each platform (https://github.com/OmniSharp/omnisharp-roslyn/releases) and downloads appropriate version during plugin start.

Why not create one release for all platforms?

How big would be FSAC.Suave with all dependencies (in comparison to current)?

Should we use .Net Core version also on Winodws?

@Krzysztof-Cieslak
Copy link
Member

I've tried running dotnet restore after clean clone of Dave's repo.


Errors in D:\Programowanie\Projekty\FsAutoComplete\src\FsAutoComplete.Core\project.json
    Unable to resolve 'Microsoft.FSharp.Core.netcore (>= 1.0.0-alpha-160509)' for '.NETStandard,Version=v1.5'.
    Unable to resolve 'FSharp.Compiler.Service.netcore (>= 1.0.0-alpha-00001)' for '.NETStandard,Version=v1.5'.
    Unable to resolve 'FSharp.Compiler.Service.ProjectCracker.netcore (>= 1.0.0-alpha-00001)' for '.NETStandard,Version=v1.5'.
    Unable to resolve 'Microsoft.FSharp.Compiler.netcore (>= 1.0.0-alpha-160318)' for '.NETCoreApp,Version=v1.0'.

Errors in D:\Programowanie\Projekty\FsAutoComplete\src\FsAutoComplete.Suave\project.json
    Unable to resolve 'FSharp.Compiler.Service.netcore (>= 1.0.0-alpha-00001)' for '.NETStandard,Version=v1.5'.
    Unable to resolve 'FSharp.Compiler.Service.ProjectCracker.netcore (>= 1.0.0-alpha-00001)' for '.NETStandard,Version=v1.5'.
    Unable to resolve 'Microsoft.FSharp.Compiler.netcore (>= 1.0.0-alpha-160318)' for '.NETCoreApp,Version=v1.0'.

Do I need to do something more?

@enricosada
Copy link
Contributor Author

Why not create one release for all platforms?

Because it's easier do that for multiple plat. With dotnet publish you can create an xcopy ready directory with all deps and program.
Also because each os need a different corehost.exe (renamed as program.exe) to run program.dll (your console app). And dpendencies may vary on each platform.

So is better to have multiple versions, less disk size.

Otherwise you need dotnet core installed in the PATH (not the experience you want, because you want to pin to a specific dotnet sdk)

Do I need to do something more?

check what feed dotnet restore use (the output), fsharp-daily is required and you need the built FCS package (after that you can dotnet restore -f /path/to/FCS/packages )

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 19, 2016

I built fcs and cracker locally and used the -f option as Enrico mentioned. I guess when the PR is finished for fcs the nugget can be published. Not sure why it isn't yet.

On 19 Jun 2016, at 11:02, Enrico Sada notifications@github.com wrote:

Why not create one release for all platforms?

Because it's easier do that for multiple plat. With dotnet publish you can create an xcopy ready directory with all deps and program.
Also because each os need a different corehost.exe (renamed as program.exe) to run program.dll (your console app). And dpendencies may vary on each platform.

So is better to have multiple versions, less disk size.

Otherwise you need dotnet core installed in the PATH (not the experience you want, because you want to pin to a specific dotnet sdk)

Do I need to do something more?

check what feed dotnet restore use (the output), fsharp-daily is required and you need the built FCS package (after that you can dotnet restore -f /path/to/FCS/packages )


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 19, 2016

[Extension Host] [E] 2016-06-19T23:10:08.7645650Z: request failed [Suave.Web.defaultErrorHandler] exn:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

File name: 'Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Microsoft.FSharp.Compiler.ToolLocationHelper.ResolveAssemblyReference..ctor()
   at Microsoft.FSharp.Compiler.MSBuildResolver.ResolveCore$cont@273(String targetFrameworkVersion, FSharpList`1 targetFrameworkDirectories, ResolutionEnvironment resolutionEnvironment, Tuple`2[] references, String outputDirectory, FSharpFunc`2 logWarning, FSharpFunc`2 logMessage, FSharpFunc`2 logError, String implicitIncludeDir, String fsharpCoreExplicitDirOrFSharpBinariesDir, String frameworkRegistryBase, FSharpList`1 explicitIncludeDirs, String assemblyFoldersSuffix, String assemblyFoldersConditions, Boolean allowRawFileName, Unit unitVar)
   at Microsoft.FSharp.Compiler.MSBuildResolver.Resolve(ResolutionEnvironment resolutionEnvironment, IEnumerable`1 references, String targetFrameworkVersion, FSharpList`1 targetFrameworkDirectories, String targetProcessorArchitecture, String outputDirectory, String fsharpBinariesDir, FSharpList`1 explicitIncludeDirs, String implicitIncludeDir, String frameworkRegistryBase, String assemblyFoldersSuffix, String assemblyFoldersConditions, FSharpFunc`2 logmessage, FSharpFunc`2 logwarning, FSharpFunc`2 logerror)
   at Microsoft.FSharp.Compiler.CompileOps.Resolve@3005-2(TcConfig tcConfig, ResolveAssemblyReferenceMode mode, range errorAndWarningRange, String targetFrameworkMajorMinor, String targetProcessorArchitecture, String outputDirectory, FSharpList`1 targetFrameworkDirectories, IEnumerable`1 references, Boolean showMessages)
   at Microsoft.FSharp.Compiler.CompileOps.TcConfig.TryResolveLibsUsingMSBuildRules(TcConfig tcConfig, FSharpList`1 originalReferences, range errorAndWarningRange, ResolveAssemblyReferenceMode mode)
   at Microsoft.FSharp.Compiler.CompileOps.TcAssemblyResolutions.Resolve(TcConfig tcConfig,
threadService.ts:207 [Extension Host]  FSharpList`1 assemblyList, FSharpList`1 knownUnresolved)
   at Microsoft.FSharp.Compiler.CompileOps.GetAssemblyResolutionInformation(TcConfig tcConfig)
   at Microsoft.FSharp.Compiler.CompileOps.ScriptPreprocessClosure.GetFullClosureOfScriptSource(String filename, String source, CodeContext codeContext, Boolean useMonoResolution, Boolean useFsiAuxLib, LexResourceManager lexResourceManager, FSharpFunc`2 applyCommmandLineArgs)
   at Microsoft.FSharp.Compiler.CompileOps.LoadClosure.ComputeClosureOfSourceText(String filename, String source, CodeContext implicitDefines, Boolean useMonoResolution, Boolean useFsiAuxLib, LexResourceManager lexResourceManager, FSharpFunc`2 applyCompilerOptions)
   at <StartupCode$FSharp-Compiler-Service-netcore>.$Service.GetProjectOptionsFromScript@2526.Invoke(CancellationToken _ct)
   at <StartupCode$FSharp-Compiler-Service-netcore>.$Reactor.EnqueueAndAwaitOpAsync@139-2.Invoke(Unit unitVar0)

I get that error, looks like msbuild stuff is still in there.

@ncave
Copy link

ncave commented Jun 19, 2016

@7sharp9 See FCS issue #581, resolved by PR #588

@duckmatt
Copy link
Contributor

I'll try to get fsharplint running on dotnet core this week

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 20, 2016

@duckmatt If there are not many dependencies if should only take ten mins :-)

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 20, 2016

Just ported the main fable project too

dotnetcore all the things!

@Krzysztof-Cieslak
Copy link
Member

So now, we just need to port ionide to Fable ;)

@enricosada
Copy link
Contributor Author

enricosada commented Jun 20, 2016

i added some notes, pls fix nuget.config and project.json as per https://github.com/dotnet/netcorecli-fsc/wiki/.NET-Core-SDK-preview1#notes .
Btw it helps because preview2 is near, and the preview1 had some issue when released (dev feed in nuget, the compile-fsc version range was too big) and i dont want to break people build.
I hope (i'll check) that next preview2 doesnt do the same errors (no devs feed needed, only nuget.org).

i'll send the pr to suave.

@enricosada
Copy link
Contributor Author

I added some FAQ (netcore vs f#) in https://github.com/dotnet/netcorecli-fsc/wiki/FAQ

@7sharp9 if you have a feedback about that, i'd really like to hear it because you converted already two proj (and that mean a solid second position as migrator 😄 )

Anyway, pls check the deps of the project, like in the faq:

netstandard1.5 for libraries, with NETStandard.Library dependency (no NetCore.App)
netcoreapp1.0 for console app, with NetCore.App(that already referenceNETStandard.Library`)

otherwise ionide bundle it's going to be big 😄

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 20, 2016

@enricosada So you want me to tweak some settings, I'll have a look now. I think there are still msbuild ref issues in FCS too :-(

I also ported fsharp-fable too ;-)

@7sharp9
Copy link
Contributor

7sharp9 commented Jun 20, 2016

@enricosada Im also using:

  "runtimes":{
    "osx.10.11-x64": { }

For publish to work in fsauto.suave

@duckmatt
Copy link
Contributor

duckmatt commented Jun 22, 2016

I've got fsharplint running on dotnet core, are any projects using paket to create a nuget package for dotnet core, or is packaging to be done as a separate step with dotnet pack?

@enricosada
Copy link
Contributor Author

See suave (rake) or chessie (fake). But process is the same.
Ping me if you need help

@enricosada
Copy link
Contributor Author

Let me review it. For example build tools dev feed is not needed

@duckmatt
Copy link
Contributor

Thanks that'll be really helpful :) I'll take a look at using the same approach as chessie tonight

@kontomondo
Copy link

@7sharp9 @duckmatt anything I can do to help move this forward?

@duckmatt
Copy link
Contributor

@kontomondo fsharplint should be nearly ready to go once we have a dotnet core version of FCS on nuget

@gulshan
Copy link

gulshan commented Feb 6, 2017

Is it possible to use Ionide with only dotnet core F# now? Do I have to change any configuration for this? I'm using VSCode.

@Krzysztof-Cieslak
Copy link
Member

It's not. You can use Ionide with dotnet core projects but you still need mono / .Net Framework to run language services.

@Korbin73
Copy link

Korbin73 commented Mar 3, 2017

Will fsAutocomplete also have a problem understanding .Net core lib namespaces like AspnetCore? I'm assuming FsAutoComplete is assuming the namespaces in core are organized the same way they are in Mono right?

@cotyar
Copy link

cotyar commented Apr 11, 2017

@Krzysztof-Cieslak, first of all great thanks for the great work you're doing with Ionide!
A quick one please, for .Net Core project is it possible to use REPL (on Mac), sorry haven't found a simple way of doing so.
And if not, is this support planned for any near future please?

@enricosada
Copy link
Contributor Author

@cotyar no repl on .net core 1.0. will be implemented for .net core 2.0, ref roadmap dotnet/fsharp#2400

@cotyar
Copy link

cotyar commented Apr 11, 2017

Thank you @enricosada.

@enricosada
Copy link
Contributor Author

FSAC on .net core is WIP in ionide/FsAutoComplete#224

@enricosada
Copy link
Contributor Author

@duckmatt do you need help/review for FsharpLint netstandard/netcore?
i'd like to have a netstandard2.0 version if possibile to use in FSAC

@enricosada
Copy link
Contributor Author

WIP in #78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Accepted suggestions that makes existing features better
Development

Successfully merging a pull request may close this issue.

9 participants