emacs-fsharp-mode icon indicating copy to clipboard operation
emacs-fsharp-mode copied to clipboard

Official docker microsoft/dotnet container errors (wrong-type-argument stringp nil)

Open j-hotlink opened this issue 6 years ago • 7 comments

Description

fsharp-mode intellisense fails inside the official microsoft/dotnet container.

Given the (or at least my) migraine of achieving a stable/reliable .NET dev environment on Linux, the official container is an appealing place to seek refuge.

Having the mode work out-the-box in the official container would significantly ease setup and distribution.

Repro steps

  1. setup test project on host machine
.
├── Test.fs
└── test.fsproj

$ cat test.fsproj 
<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="Test.fs" />
  </ItemGroup>

</Project>

$ cat Test.fs 
module Test

printfn "%s" "Hello"

  1. launch and enter official dotnet container, mounting project folder as "volume"
$ docker run -itd --memory 2048mb --name fsharp-test -v $(pwd):/volume microsoft/dotnet:2.0.0-sdk /bin/bash
$ docker exec -it fsharp-test /bin/bash
  1. Install emacs and create .emacs file
$ apt-get update && apt-get install -y emacs
$ echo """(require 'package)
(add-to-list 'package-archives '(\"melpa-stable\" . \"https://stable.melpa.org/packages/\") t)
(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\"))
(package-initialize)
(setq fsharp-ac-debug 2)
(setq shell-file-name \"/bin/bash\")
""" > /root/.emacs
  1. Open emacs and install fsharp-mode 20170918.842 (via package-list-packages)

  2. Close emacs and restart, opening source file

$ emacs /volume/Test.fs

Expected behaviour

fsharp-mode works without errors

Actual behaviour

error message : File mode specification error: (wrong-type-argument stringp nil) code linting works, however intellisese does not and *fsharp-debug* buffer is absent

executing toggle-debug-on-error and then reloading the file yields this stack trace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("[\\\"]\\| " nil)
  #[257 "\301\300^B\"\203^P^@\302\303\304\305^D#\302Q\207\207" ["[\\\"]\\| " string-match "\"" replace-regexp-in-string "[\\\"]" "\$
  mapconcat(#[257 "\301\300^B\"\203^P^@\302\303\304\305^D#\302Q\207\207" ["[\\\"]\\| " string-match "\"" replace-regexp-in-string "$
  combine-and-quote-strings((nil "/nologo" "/volume/test.fsproj"))
  fsharp-mode-choose-compile-command("/volume/Test.fs")
  fsharp-mode()
  set-auto-mode-0(fsharp-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer Test.fs> "/volume/Test.fs" nil nil "/volume/Test.fs" (7292840 2050))
  find-file-noselect("/volume/Test.fs" nil nil t)
  find-file("/volume/Test.fs" t)
  find-alternate-file("/volume/Test.fs" t)
  call-interactively(find-alternate-file nil nil)
  command-execute(find-alternate-file)

Known workarounds

none observed

Related information

  • Host : Ubuntu 16.04
  • Container : microsoft/dotnet:2.0.0-sdk
  • Emacs version : 24.5.1
  • fsharp-mode : 20170918.842
  • dotnet --version = 2.0.0

j-hotlink avatar Oct 02 '17 19:10 j-hotlink

Likely the same as #148, I will investigate tomorrow.

rneatherway avatar Oct 02 '17 20:10 rneatherway

I think the problem is in fsharp-mode--msbuild-find. Could you try checking the value of the variable fsharp-build-command, and then also invoking (fsharp-mode--msbuild-find "xbuild") (this is Mono right?)

rneatherway avatar Oct 06 '17 09:10 rneatherway

Mono doesn't appear to be present within the microsoft/dotnet container.

root@02a693653d61:/ $ mono
bash: mono: command not found

root@02a693653d61:/ $ find / -iname 'mono'

root@02a693653d61:/ $ find / -iname 'mono.dll'

root@02a693653d61:/ $ find / -iname 'mono.exe'

root@02a693653d61:/

Emacs info:

(describe-variable 'fsharp-build-command)
...
#("fsharp-build-command is a variable defined in `fsharp-mode.el'.
Its value is nil

and

(fsharp-mode--msbuild-find "xbuild")
...
nil

Some additional info (if you prefer to observe directly, the repro steps will reliably produce the environment):

root@02a693653d61:/ $ find / -iname '*xbuild*'

root@02a693653d61:/ $ find / -iname '*msbuild*'
/usr/share/dotnet/sdk/NuGetFallbackFolder/microsoft.visualstudio.web.codegeneration.tools/2.0.0/toolassets/net461/Microsoft.VisualStudio.Web.CodeGeneration.Msbuild.dll
/usr/share/dotnet/sdk/NuGetFallbackFolder/microsoft.visualstudio.web.codegeneration.tools/2.0.0/toolassets/netcoreapp2.0/Microsoft.VisualStudio.Web.CodeGeneration.Msbuild.dll
/usr/share/dotnet/sdk/NuGetFallbackFolder/microsoft.build.runtime/15.3.409/contentFiles/any/net46/MSBuild.exe
/usr/share/dotnet/sdk/NuGetFallbackFolder/microsoft.build.runtime/15.3.409/contentFiles/any/net46/MSBuild.exe.config
/usr/share/dotnet/sdk/NuGetFallbackFolder/microsoft.build.runtime/15.3.409/contentFiles/any/netcoreapp1.0/MSBuild.dll
/usr/share/dotnet/sdk/NuGetFallbackFolder/microsoft.build.runtime/15.3.409/contentFiles/any/netcoreapp1.0/MSBuild.runtimeconfig.json
/usr/share/dotnet/sdk/2.0.0/minimumMSBuildVersion
/usr/share/dotnet/sdk/2.0.0/MSBuild.deps.json
/usr/share/dotnet/sdk/2.0.0/MSBuild.dll
/usr/share/dotnet/sdk/2.0.0/MSBuild.runtimeconfig.json

root@02a693653d61:/ $ dotnet -h
.NET Command Line Tools (2.0.0)
Usage: dotnet [runtime-options] [path-to-application]
Usage: dotnet [sdk-options] [command] [arguments] [command-options]

path-to-application:
  The path to an application .dll file to execute.

SDK commands:
  new              Initialize .NET projects.
  restore          Restore dependencies specified in the .NET project.
  run              Compiles and immediately executes a .NET project.
  build            Builds a .NET project.
  publish          Publishes a .NET project for deployment (including the runtime).
  test             Runs unit tests using the test runner specified in the project.
  pack             Creates a NuGet package.
  migrate          Migrates a project.json based project to a msbuild based project.
  clean            Clean build output(s).
  sln              Modify solution (SLN) files.
  add              Add reference to the project.
  remove           Remove reference from the project.
  list             List reference in the project.
  nuget            Provides additional NuGet commands.
  msbuild          Runs Microsoft Build Engine (MSBuild).
  vstest           Runs Microsoft Test Execution Command Line Tool.

Common options:
  -v|--verbosity        Set the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
  -h|--help             Show help.

Run 'dotnet COMMAND --help' for more information on a command.

sdk-options:
  --version        Display .NET Core SDK version.
  --info           Display .NET Core information.
  -d|--diagnostics Enable diagnostic output.

runtime-options:
  --additionalprobingpath <path>    Path containing probing policy and assemblies to probe for.
  --fx-version <version>            Version of the installed Shared Framework to use to run the application.
  --roll-forward-on-no-candidate-fx Roll forward on no candidate shared framework is enabled.
  --additional-deps <path>          Path to additonal deps.json file.


root@02a693653d61:/ $ dotnet msbuild /version
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

15.3.409.57025root@02a693653d61:/ $ 

j-hotlink avatar Oct 06 '17 21:10 j-hotlink

Ah interesting. I assume linux =~ mono, which I guess is false if using the new dotnet stuff. How do you build your projects? dotnet build? What precedence would you give that vs xbuild? Or try parsing the project file to determine what tool we should prefer?

rneatherway avatar Oct 10 '17 17:10 rneatherway

Personally I would avoid drawing conclusions from .fsproj files wherever possible (admittedly a gut feel and I'm unfamiliar with compiler services, but it does seem the left/right hands of fsharp/dotnet belong to entirely different people making compatibility hard). For reference my .fsproj file required these additional tags to work with dotnet:

    <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
    <RuntimeIdentifiers>debian.8-x64,alpine.3.6,alpine-x64</RuntimeIdentifiers>

I think users will have to configure the toolset themselves - auto-discovery seems likely to be inaccurate given the diversity of environments (tools and versions thereof) available. Profiles may be helpful ...

My standard build sequence is:

dotnet restore
dotnet build
dotnet run
dotnet publish

I amended fsharp-mode.el directly with this to see what would happen:

(defvar fsharp-build-command "dotnet msbuild" "The command used to build F# projects and solutions.")

I then receive this message opening a .fs file: "Failed to start fsautocomplete (Searching for program: No such file or directory, mono). Disabling intellisense. To reenable, set fsharp-ac-intellisense-enabled to t."

Here are my (unsuccessful) steps to start fsautocomplete.exe from a bash shell within the container:

root@02a693653d61:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin $ dotnet fsautocomplete.exe
A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/'.

root@02a693653d61:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin $ find / -name libhostpolicy.so
/usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libhostpolicy.so
/root/.nuget/packages/runtime.linux-x64.microsoft.netcore.dotnethostpolicy/2.0.0/runtimes/linux-x64/native/libhostpolicy.so

root@02a693653d61:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin $ cp /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libhostpolicy.so .

root@02a693653d61:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin $ dotnet fsautocomplete.exe
Could not resolve CoreCLR path. For more details, enable tracing by setting COREHOST_TRACE environment variable to 1

root@02a693653d61:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin $ export COREHOST_TRACE=1

root@02a693653d61:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin $ dotnet fsautocomplete.exe
Tracing enabled
--- Invoked dotnet [version: 2.0.0, commit hash: e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d] main = {
dotnet
fsautocomplete.exe
}
Reading fx resolver directory=[/usr/share/dotnet/host/fxr]
Considering fxr version=[..]...
Considering fxr version=[.]...
Considering fxr version=[2.0.0]...
Detected latest fxr version=[/usr/share/dotnet/host/fxr/2.0.0]...
Resolved fxr [/usr/share/dotnet/host/fxr/2.0.0/libhostfxr.so]...
Tracing enabled
--- Invoked hostfxr [commit hash: e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d] main
Own dll path '/usr/share/dotnet/dotnet.dll'
Checking if CoreCLR path exists=[/usr/share/dotnet/libcoreclr.so]
--- Executing in muxer mode...
Detected a non-standalone application, expecting app.dll to execute.
Treating application '/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.exe' as a managed executable.
App runtimeconfig.json from [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.exe]
Runtime config is cfg=/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.json dev=/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.dev.json
Attempting to read runtime config: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.json
Attempting to read dev runtime config: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.dev.json
Runtime config [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.json] is valid=[1]
Executing as a standalone app as per config file [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.json]
--- Resolving libhostpolicy.so version from deps json [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.deps.json]
Dependency manifest [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.deps.json] does not exist
The expected libhostpolicy.so directory is [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/]
Tracing enabled
Reading from host interface version: [0x16041101:144] to initialize policy version: [0x16041101:144]
--- Invoked hostpolicy [commit hash: e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d] [runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy,2.0.0,runtimes/linux-x64/native][x64] main = {
dotnet
fsautocomplete.exe
}
Deps file:
Directory core servicing at [] was not specified or found
Fallback directory core servicing at [opt/coreservicing] was not found
-- arguments_t: own_path='/usr/share/dotnet/dotnet' app_dir='/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/' deps='/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.deps.json' core_svc='' mgd_ap\
p='/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.exe'
-- arguments_t: dotnet shared store: ''
Could not locate the dependencies manifest file [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.deps.json]. Some libraries may fail to resolve.
-- Listing probe configurations...
probe_config_t: probe=[]  deps-json=[(nil)] deps-dir-probe=[1]
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.exe
Adding files from local dir /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/
Adding FParsecCS to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FParsecCS.dll
Adding FSharp.Compiler.Service to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.dll
Adding Argu to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Argu.dll
Adding Suave to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Suave.dll
Adding Sln to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Sln.dll
Adding Dotnet.ProjInfo to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Dotnet.ProjInfo.dll
Adding FSharp.Core to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Core.dll
Adding FParsec to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FParsec.dll
Adding FSharpLint.Core to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharpLint.Core.dll
Adding FSharp.Compiler.Service.ProjectCracker to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.ProjectCracker.dll
Adding System.Collections.Immutable to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/System.Collections.Immutable.dll
Adding System.Reflection.Metadata to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/System.Reflection.Metadata.dll
Adding Newtonsoft.Json to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Newtonsoft.Json.dll
Adding FsAutoComplete.Core to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FsAutoComplete.Core.dll
Adding fsautocomplete to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.exe
Adding FSharp.Compiler.Service.ProjectCrackerTool to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.ProjectCrackerTool.exe
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.ProjectCrackerTool.exe
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Newtonsoft.Json.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/System.Reflection.Metadata.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/System.Collections.Immutable.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FParsecCS.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Argu.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Sln.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FsAutoComplete.Core.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharpLint.Core.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Dotnet.ProjInfo.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Core.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Suave.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FParsec.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.ProjectCracker.dll
Adding to native path: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin
Adding to resources path: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin
Could not resolve CoreCLR path. For more details, enable tracing by setting COREHOST_TRACE environment variable to 1

root@02a693653d61:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin $ find / -name libcoreclr.so
/usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so
/root/.nuget/packages/runtime.linux-x64.microsoft.netcore.app/2.0.0/runtimes/linux-x64/native/libcoreclr.so

root@02a693653d61:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin $ cp /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so .

root@02a693653d61:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin $ dotnet fsautocomplete.exe
Tracing enabled
--- Invoked dotnet [version: 2.0.0, commit hash: e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d] main = {
dotnet
fsautocomplete.exe
}
Reading fx resolver directory=[/usr/share/dotnet/host/fxr]
Considering fxr version=[..]...
Considering fxr version=[.]...
Considering fxr version=[2.0.0]...
Detected latest fxr version=[/usr/share/dotnet/host/fxr/2.0.0]...
Resolved fxr [/usr/share/dotnet/host/fxr/2.0.0/libhostfxr.so]...
Tracing enabled
--- Invoked hostfxr [commit hash: e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d] main
Own dll path '/usr/share/dotnet/dotnet.dll'
Checking if CoreCLR path exists=[/usr/share/dotnet/libcoreclr.so]
--- Executing in muxer mode...
Detected a non-standalone application, expecting app.dll to execute.
Treating application '/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.exe' as a managed executable.
App runtimeconfig.json from [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.exe]
Runtime config is cfg=/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.json dev=/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.dev.json
Attempting to read runtime config: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.json
Attempting to read dev runtime config: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.dev.json
Runtime config [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.json] is valid=[1]
Executing as a standalone app as per config file [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.runtimeconfig.json]
--- Resolving libhostpolicy.so version from deps json [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.deps.json]
Dependency manifest [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.deps.json] does not exist
The expected libhostpolicy.so directory is [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/]
Tracing enabled
Reading from host interface version: [0x16041101:144] to initialize policy version: [0x16041101:144]
--- Invoked hostpolicy [commit hash: e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d] [runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy,2.0.0,runtimes/linux-x64/native][x64] main = {
dotnet
fsautocomplete.exe
}
Deps file:
Directory core servicing at [] was not specified or found
Fallback directory core servicing at [opt/coreservicing] was not found
-- arguments_t: own_path='/usr/share/dotnet/dotnet' app_dir='/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/' deps='/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.deps.json' core_svc='' mgd_ap\
p='/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.exe'
-- arguments_t: dotnet shared store: ''
Could not locate the dependencies manifest file [/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.deps.json]. Some libraries may fail to resolve.
-- Listing probe configurations...
probe_config_t: probe=[]  deps-json=[(nil)] deps-dir-probe=[1]
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.exe
Adding files from local dir /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/
Adding FParsecCS to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FParsecCS.dll
Adding FSharp.Compiler.Service to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.dll
Adding Argu to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Argu.dll
Adding Suave to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Suave.dll
Adding Sln to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Sln.dll
Adding Dotnet.ProjInfo to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Dotnet.ProjInfo.dll
Adding FSharp.Core to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Core.dll
Adding FParsec to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FParsec.dll
Adding FSharpLint.Core to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharpLint.Core.dll
Adding FSharp.Compiler.Service.ProjectCracker to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.ProjectCracker.dll
Adding System.Collections.Immutable to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/System.Collections.Immutable.dll
Adding System.Reflection.Metadata to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/System.Reflection.Metadata.dll
Adding Newtonsoft.Json to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Newtonsoft.Json.dll
Adding FsAutoComplete.Core to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FsAutoComplete.Core.dll
Adding fsautocomplete to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.exe
Adding FSharp.Compiler.Service.ProjectCrackerTool to local assembly set from /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.ProjectCrackerTool.exe
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.ProjectCrackerTool.exe
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Newtonsoft.Json.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/System.Reflection.Metadata.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/System.Collections.Immutable.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FParsecCS.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Argu.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Sln.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FsAutoComplete.Core.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharpLint.Core.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Dotnet.ProjInfo.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Core.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Suave.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FParsec.dll
Adding tpa entry: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.ProjectCracker.dll
Adding to native path: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin
Adding to resources path: /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin
Could not resolve CLRJit path
CoreCLR path = '/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/libcoreclr.so', CoreCLR dir = '/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/'
Property TRUSTED_PLATFORM_ASSEMBLIES = /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.exe:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.ProjectCrackerTool.exe:/root/.e\
macs.d/elpa/fsharp-mode-20170918.842/bin/Newtonsoft.Json.dll:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/System.Reflection.Metadata.dll:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/System.Collections.Im\
mutable.dll:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FParsecCS.dll:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Argu.dll:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Sln.dll:/root/.emacs.d/elpa/f\
sharp-mode-20170918.842/bin/FsAutoComplete.Core.dll:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.dll:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharpLint.Core.dll:/root/.emacs.\
d/elpa/fsharp-mode-20170918.842/bin/Dotnet.ProjInfo.dll:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Core.dll:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/Suave.dll:/root/.emacs.d/elpa/fsharp-mode\
-20170918.842/bin/FParsec.dll:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/FSharp.Compiler.Service.ProjectCracker.dll:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/System.Private.CoreLib.dll:
Property NATIVE_DLL_SEARCH_DIRECTORIES = /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin:
Property PLATFORM_RESOURCE_ROOTS = /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin:
Property AppDomainCompatSwitch = UseLatestBehaviorWhenTFMNotSpecified
Property APP_CONTEXT_BASE_DIRECTORY = /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/
Property APP_CONTEXT_DEPS_FILES = /root/.emacs.d/elpa/fsharp-mode-20170918.842/bin/fsautocomplete.deps.json;
Property FX_DEPS_FILE =
Property PROBING_DIRECTORIES =
Failed to initialize CoreCLR, HRESULT: 0x80004005

root@02a693653d61:/root/.emacs.d/elpa/fsharp-mode-20170918.842/bin $ 

I'm uncertain of what's required to make that work - the solution may be bigger than advertised.

j-hotlink avatar Oct 10 '17 22:10 j-hotlink

OK, so I think we have a bigger issue here that we should discuss over at the FSAC repository, namely that the released version doesn't work with the .NET Core CLI. I am quite out of touch with .NET Core so I am not sure if that is supposed to work. If not, we might have to bundle two versions or something unpleasant like that.

This issue is fine to track that fsharp-mode assumes that mono iff Linux, but it seems we can't change that until FSAC works with .NET Core.

rneatherway avatar Oct 12 '17 08:10 rneatherway

the microsoft/dotnet container is .net core (linux container) + .net (win container).

you can use another container, and install mono on that. or directly use the fsharp docker container, who contains f# and mono ( https://hub.docker.com/_/fsharp/ )

as a note, the support for a .net core based fsac is WIP in https://github.com/fsharp/FsAutoComplete/pull/224 , after that will work in .net core containers (with some limitations, like no support for old fsproj, etc)

enricosada avatar Oct 12 '17 10:10 enricosada