fsharp / fsharp/emacs-fsharp-mode

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

Open
#150 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
215
Forks
65
PR merge metrics
No merged PRs in 30d

Description

### 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


Exe
netcoreapp2.0



$ cat Test.fs
module Test

printfn "%s" "Hello"

```

2. 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
```

3. 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
```

4. Open emacs and install fsharp-mode 20170918.842 (via package-list-packages)

5. 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(# "/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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.