serve-d
serve-d copied to clipboard
Failed to install serve-d on MacOS M1
macOS Monterey, M1, using LDC - the LLVM D compiler (1.27.1)
for ARM64.
Running VSCode results in the following error below
Installing into /Users/pavels/.vscode/extensions/webfreak.code-d-0.23.0/bin
> git clone --recursive https://github.com/Pure-D/serve-d.git serve-d
Cloning into 'serve-d'...
> git checkout v0.7.0
Note: switching to 'v0.7.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at f10a352 bump to 0.7.0 (stable)
> /usr/local/bin/dub upgrade
Upgrading project in /Users/pavels/.vscode/extensions/webfreak.code-d-0.23.0/bin/serve-d
Fetching silly 1.1.1 (getting selected version)...
Fetching taggedalgebraic 0.11.22 (getting selected version)...
Fetching dub 1.26.1 (getting selected version)...
Fetching dcd 0.13.6 (getting selected version)...
Fetching eventcore 0.9.19 (getting selected version)...
Fetching vibe-d 0.9.4 (getting selected version)...
Fetching dfmt 0.14.1 (getting selected version)...
Fetching inifiled 1.3.3 (getting selected version)...
Fetching vibe-core 1.21.0 (getting selected version)...
Fetching requests 1.1.7 (getting selected version)...
Fetching workspace-d 3.6.1 (getting selected version)...
Fetching dscanner 0.11.1 (getting selected version)...
Fetching diet-ng 1.8.0 (getting selected version)...
Fetching libdparse 0.17.0 (getting selected version)...
Fetching libddoc 0.7.4 (getting selected version)...
> /usr/local/bin/dub build --compiler=/usr/local/bin/rdmd
Failed to invoke the compiler /usr/local/bin/rdmd to determine the build platform: rdmd build 20210814
Usage: rdmd [RDMD AND DMD OPTIONS]... program [PROGRAM OPTIONS]...
Builds (with dependents) and runs a D program.
Example: rdmd -release myprog --myprogparm 5
Any option to be passed to the compiler must occur before the program name. In
addition to compiler options, rdmd recognizes the following options:
--build-only just build the executable, don't run it
--chatty write compiler commands to stdout before executing them
--compiler=comp use the specified compiler (e.g. gdmd) instead of ldmd2
--dry-run do not compile, just show what commands would be run
(implies --chatty)
--eval=code evaluate code as in perl -e (multiple --eval allowed)
--exclude=package exclude a package from the build (multiple --exclude allowed)
--include=package negate --exclude or a standard package (std, etc, core)
--extra-file=file include an extra source or object in the compilation
(multiple --extra-file allowed)
--force force a rebuild even if apparently not necessary
--help this message
--loop=code like eval, but wraps code in "foreach (line; stdin.byLine()) { ... }"
--main add a stub main program to the mix (e.g. for unittesting)
--makedepend print dependencies in makefile format and exit
(needs dmd's option `-of` to be present)
--makedepfile=file print dependencies in makefile format to file and continue
(needs dmd's option `-of` to be present)
--man open web browser on manual page
--shebang rdmd is in a shebang line (put as first argument)
--tmpdir set an alternative temporary directory
Option -o- currently not supported by rdmd
Failed to install serve-d (Error code 2)
what did code-d detect as compiler? it seems to try using rdmd to build serve-d as compiler (not allowed, only allowed to use dmd, ldc or gdc)
once supported by github actions I could also distribute prebuilt arm packages for linux and mac which would be picked up automatically without the need to update code-d
Looks like it tries to use rdmd
in order to "determine the build platform". If I remove rdmd
from /usr/local/bin
, it fails to install
> /usr/local/bin/dub upgrade
Upgrading project in /Users/pavels/.vscode/extensions/webfreak.code-d-0.23.0/bin/serve-d
> /usr/local/bin/dub build --compiler=/usr/local/bin/rdmd
Failed to invoke the compiler /usr/local/bin/rdmd to determine the build platform: /bin/sh: /usr/local/bin/rdmd: No such file or directory
Failed to install serve-d (Error code 2)
So, the issue is that it cannot determine the build platform I guess.
can you send me your user settings (JSON)? (in the user settings at the top right you can switch to JSON mode)
{
"d.servedPath": "/Users/pavels/.vscode/extensions/webfreak.code-d-0.22.0/bin/serve-d/serve-d",
"d.dcdClientPath": "/Users/pavels/.code-d/bin/dcd-client",
"d.dcdServerPath": "/Users/pavels/.code-d/bin/dcd-server",
"workbench.editorAssociations": {
"*.ipynb": "jupyter-notebook"
},
"files.watcherExclude": {
"**/.bloop": true,
"**/.metals": true,
"**/.ammonite": true
},
"workbench.startupEditor": "newUntitledFile",
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"d.dubPath": "/usr/local/bin/dub",
"d.dubCompiler": "ldc",
"d.dmdPath": "/usr/local/bin/rdmd",
"d.enableDMDImportTiming": true,
"workbench.colorTheme": "Base16 Dark Ocean",
"python.condaPath": "/Users/pavels/miniforge3/bin/conda",
"python.defaultInterpreterPath": "/Users/pavels/miniforge3/bin/python",
"python.formatting.provider": "black",
"files.trimTrailingWhitespace": true,
"editor.minimap.enabled": false,
"editor.formatOnSave": true,
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"d.stdlibPath": "auto"
}
Changing d.dmdPath
to /usr/local/bin/ldc
leads to
> /usr/local/bin/dub upgrade
Upgrading project in /Users/pavels/.vscode/extensions/webfreak.code-d-0.23.0/bin/serve-d
> /usr/local/bin/dub build --compiler=/usr/local/bin/ldc
## Warning for package serve-d, configuration unittest-optimized ##
The following compiler flags have been specified in the package description
file. They are handled by DUB and direct use in packages is discouraged.
Alternatively, you can set the DFLAGS environment variable to pass custom flags
to the compiler, or use one of the suggestions below:
debugInfo: Call DUB with --build=debug
optimize: Call DUB with --build=release
unittests: Call DUB with --build=unittest
Invalid source/import path: /Users/pavels/.dub/packages/dfmt-0.14.1/dfmt/bin
Running pre-generate commands for dfmt...
/bin/sh: rdmd: command not found
Command failed with exit code 127: rdmd "/Users/pavels/.dub/packages/dfmt-0.14.1/dfmt/dubhash.d"
Failed to install serve-d (Error code 2)
ah it uses dmdPath to compile, which is set to rdmd, which dub doesn't understand
Try unsetting your d.dmdPath variable or setting it to actual dmd, then it should build
It builds fine with DMD. I see, the problem that DMD does not have M1 support and the whole toolchain get build against x86_64.
Well, I guess we need to wait until DMD gets ARM64 port. Closing.
when you unset dmdPath it should use ldc
Hmm, I removed dmdPath
completely and it didn't build without installing DMD first.
did you have LDC installed? It will run dub
(the one specified in your d.dubPath settings) which will auto select a compiler
As I mentioned, I have ldc symlinks in /usr/local/bin/
:
/usr/local/bin/ldc --> /Users/pavels/.local/share/ldc2/bin/ldc
/usr/local/bin/dub --> /Users/pavels/.local/share/ldc2/bin/dub
/usr/local/bin/rdmd --> /Users/pavels/.local/share/ldc2/bin/rdmd
I had to remove rdmd
symlink and install x86_64 DMD in order for serve-d
to work with dmd compiler.
can you share the log where you said it doesn't compile without installing DMD first?
I have uninstalled DMD using uninstall.command
shell script provided with DMD installer and trying to reproduce the previous log message in VSCode. However, now VSCode tell me that it Could not initialise dub for ... Falling back to limited functionality! Cannot use dub with invalid configuration
.
that means it's using serve-d right now, delete the compiled serve-d file from where it put it (check user settings, should be ~/.code-d)
@tastyminerals I have pushed a new code-d release (v0.23.1) where it now prefers d.dubCompiler as compiler when compiling from source. When you update it should build with ldc (and with that hopefully target your ARM processor)
you can also force a rebuild by adding "d.forceUpdateServeD": true
to your user settings (and deleting it afterwards)
After uninstalling and installing the plugin, it works fine and I get the following output:
Installing into /Users/pavels/.vscode/extensions/webfreak.code-d-0.23.1/bin
Removing old version
Removed old version
> git clone --recursive https://github.com/Pure-D/serve-d.git serve-d
Cloning into 'serve-d'...
> git checkout v0.7.0
Note: switching to 'v0.7.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at f10a352 bump to 0.7.0 (stable)
> /usr/local/bin/dub upgrade
Upgrading project in /Users/pavels/.vscode/extensions/webfreak.code-d-0.23.1/bin/serve-d
> /usr/local/bin/dub build --compiler=ldc
## Warning for package serve-d, configuration unittest-optimized ##
The following compiler flags have been specified in the package description
file. They are handled by DUB and direct use in packages is discouraged.
Alternatively, you can set the DFLAGS environment variable to pass custom flags
to the compiler, or use one of the suggestions below:
debugInfo: Call DUB with --build=debug
optimize: Call DUB with --build=release
unittests: Call DUB with --build=unittest
Running pre-generate commands for dfmt...
Running pre-generate commands for dscanner...
Running pre-generate commands for dcd:common...
Performing "$DFLAGS" build using ldc for aarch64, arm_hardfloat.
diet-complete 0.0.3: target for configuration "library" is up to date.
stdx-allocator 2.77.5: target for configuration "library" is up to date.
emsi_containers 0.8.0: target for configuration "library" is up to date.
eventsystem 1.2.0: target for configuration "library" is up to date.
libdparse 0.17.0: target for configuration "library" is up to date.
libddoc 0.7.4: target for configuration "lib" is up to date.
cachetools 0.3.1: target for configuration "library" is up to date.
requests 1.1.7: target for configuration "std" is up to date.
serve-d:http 0.7.0: building configuration "library"...
dunit 1.0.16: target for configuration "library" is up to date.
painlesstraits 0.3.0: target for configuration "unittest" is up to date.
painlessjson 1.4.0: target for configuration "library" is up to date.
serve-d:lsp 0.7.0: building configuration "library"...
dfmt 0.14.1: target for configuration "library" is up to date.
dsymbol 0.11.3: target for configuration "library" is up to date.
inifiled 1.3.3: target for configuration "library-quiet" is up to date.
dscanner 0.11.1: target for configuration "library" is up to date.
dub 1.26.1: target for configuration "library" is up to date.
isfreedesktop 0.1.1: target for configuration "library" is up to date.
xdgpaths 0.2.5: target for configuration "library" is up to date.
standardpaths 0.8.1: target for configuration "default" is up to date.
msgpack-d 1.0.1: target for configuration "default" is up to date.
dcd:common 0.13.6: target for configuration "library" is up to date.
workspace-d:dcd 3.6.1: target for configuration "library" is up to date.
workspace-d 3.6.1: target for configuration "library" is up to date.
serve-d:serverbase 0.7.0: building configuration "library"...
serve-d 0.7.0: building configuration "executable"...
/Users/pavels/.dub/packages/msgpack-d-1.0.1/msgpack-d/src/msgpack/common.d(532,9): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
/Users/pavels/.dub/packages/dsymbol-0.11.3/dsymbol/src/dsymbol/conversion/first.d(75,2): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
/Users/pavels/.dub/packages/dsymbol-0.11.3/dsymbol/src/dsymbol/conversion/first.d(1114,2): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
/Users/pavels/.dub/packages/dsymbol-0.11.3/dsymbol/src/dsymbol/conversion/second.d(109,1): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
/Users/pavels/.dub/packages/dsymbol-0.11.3/dsymbol/src/dsymbol/conversion/second.d(168,1): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
/Users/pavels/.dub/packages/dscanner-0.11.1/dscanner/src/dscanner/analysis/undocumented.d(268,2): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
/Users/pavels/.dub/packages/dscanner-0.11.1/dscanner/src/dscanner/analysis/undocumented.d(278,2): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
/Users/pavels/.dub/packages/dub-1.26.1/dub/source/dub/dependency.d(779,2): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
/Users/pavels/.dub/packages/dub-1.26.1/dub/source/dub/semver.d(106,1): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
/Users/pavels/.dub/packages/dub-1.26.1/dub/source/dub/packagemanager.d(275,2): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
/Users/pavels/.dub/packages/painlessjson-1.4.0/painlessjson/source/painlessjson/painlessjson.d-mixin-468(468,48): Deprecation: module served.lsp.protocol is not accessible here, perhaps add 'static import served.lsp.protocol;'
/Users/pavels/.dub/packages/painlessjson-1.4.0/painlessjson/source/painlessjson/painlessjson.d-mixin-473(473,49): Deprecation: module served.lsp.protocol is not accessible here, perhaps add 'static import served.lsp.protocol;'
/Users/pavels/.dub/packages/painlessjson-1.4.0/painlessjson/source/painlessjson/painlessjson.d-mixin-468(468,48): Deprecation: module served.lsp.protocol is not accessible here, perhaps add 'static import served.lsp.protocol;'
/Users/pavels/.dub/packages/painlessjson-1.4.0/painlessjson/source/painlessjson/painlessjson.d-mixin-473(473,49): Deprecation: module served.lsp.protocol is not accessible here, perhaps add 'static import served.lsp.protocol;'
/Users/pavels/.dub/packages/painlessjson-1.4.0/painlessjson/source/painlessjson/painlessjson.d-mixin-468(468,48): Deprecation: module served.lsp.protocol is not accessible here, perhaps add 'static import served.lsp.protocol;'
/Users/pavels/.dub/packages/painlessjson-1.4.0/painlessjson/source/painlessjson/painlessjson.d-mixin-473(473,49): Deprecation: module served.lsp.protocol is not accessible here, perhaps add 'static import served.lsp.protocol;'
/Users/pavels/.dub/packages/painlessjson-1.4.0/painlessjson/source/painlessjson/painlessjson.d-mixin-468(468,48): Deprecation: module served.lsp.protocol is not accessible here, perhaps add 'static import served.lsp.protocol;'
/Users/pavels/.dub/packages/painlessjson-1.4.0/painlessjson/source/painlessjson/painlessjson.d-mixin-473(473,49): Deprecation: module served.lsp.protocol is not accessible here, perhaps add 'static import served.lsp.protocol;'
Linking...
To force a rebuild of up-to-date targets, run again with --force.
Done compiling
Afterwards when I close and restart VSCode, it attempts to run dcd-server
and fails.
serve-d v0.7.0 with workspace-d v3.6.1
Included features: "d", "workspaces"
Built: Tue Nov 23 10:28:15 2021
with compiler LDC v2.97 on osx littleEndian
dub, dfmt and dscanner are bundled within (compiled in)
2021-11-23T10:29:08.963 [info] dcd.d:80:reloadBinaries using builtin DCD client
2021-11-23T10:29:09.097 [info] extension.d:657:rootsForProject Root Suggestions: [RootSuggestion("/Users/pavels/Dev/Gini/general/document-sender-app", true)]
2021-11-23T10:29:09.097 [info] extension.d:689:doStartup registering instance for root RootSuggestion("/Users/pavels/Dev/Gini/general/document-sender-app", true)
2021-11-23T10:29:09.098 [info] extension.d:777:delayedProjectActivation Initializing instance for root RootSuggestion("/Users/pavels/Dev/Gini/general/document-sender-app", true)
Dub Error (ignored): object.Exception@/Users/pavels/.dub/packages/dub-1.26.1/dub/source/dub/compilers/compiler.d(134): Failed to invoke the compiler dmd to determine the build platform: /bin/sh: dmd: command not found
----------------
??:? _D3std9exception__T7bailOutHTC9ExceptionZQwFNaNfAyamMAxaZNn [0x102476b4f]
??:? pure @safe bool std.exception.enforce!().enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x10240c5fb]
??:? dub.platform.BuildPlatform dub.compilers.compiler.Compiler.probePlatform(immutable(char)[], immutable(char)[][], immutable(char)[]) [0x102942343]
??:? bool workspaced.com.dub.DubComponent.setCompiler(immutable(char)[]) [0x1026df493]
??:? void workspaced.com.dub.DubComponent.start() [0x1026debd3]
??:? void workspaced.com.dub.DubComponent.load() [0x1026dc057]
??:? _DThn16_10workspaced3api__T23DefaultComponentFactoryHTCQBv3com3dub12DubComponentZQCc6createMFNbCQDk7backend10WorkspaceDCQEiQyQs8InstanceJC9ExceptionZCQFmQFd16ComponentWrapper [0x10246c05b]
??:? bool workspaced.backend.WorkspaceD.attach(workspaced.backend.WorkspaceD.Instance, immutable(char)[], out Exception) [0x102675f33]
??:? void served.extension.delayedProjectActivation(workspaced.backend.WorkspaceD.Instance, immutable(char)[], immutable(char)[], served.extension.RootSuggestion) [0x10242935f]
??:? void served.extension.doStartup(immutable(char)[]).lazyLoadCallback(workspaced.backend.WorkspaceD.Instance, immutable(char)[], immutable(char)[], served.extension.RootSuggestion).__lambda5() [0x102428e43]
??:? const void served.backend.lazy_workspaced.LazyWorkspaceD.LazyInstance.accessCheck() [0x102450a4b]
??:? const nothrow bool served.backend.lazy_workspaced.LazyWorkspaceD.LazyInstance.checkHasComponent(workspaced.api.ComponentInfo) [0x10245114b]
??:? void served.extension.changedConfig(immutable(char)[], immutable(char)[][], served.types.Configuration, bool, ulong, ulong) [0x102418fdb]
??:? void served.extension.processConfigChange(served.types.Configuration) [0x10241c67b]
??:? void served.extension.didChangeConfiguration(served.lsp.protocol.DidChangeConfigurationParams) [0x1023e1adf]
??:? void served.types.lspRouter.eventProcessor.emitProtocol!(served.utils.events.protocolNotification, served.types.lspRouter.processNotify(served.lsp.protocol.RequestMessage).__lambda3, false).emitProtocol(immutable(char)[], std.json.JSONValue).__lambda4!(immutable(char)[], void function(served.lsp.protocol.DidChangeConfigurationParams)*, served.utils.events.protocolNotification).__lambda4(immutable(char)[], void function(served.lsp.protocol.DidChangeConfigurationParams)*, served.utils.events.protocolNotification).callSymbol() [0x1023e14a7]
??:? void served.types.lspRouter.processNotify(served.lsp.protocol.RequestMessage).__lambda3!(immutable(char)[], void delegate(), served.utils.events.protocolNotification).__lambda3(immutable(char)[], void delegate(), served.utils.events.protocolNotification) [0x1023e1533]
??:? bool served.types.lspRouter.eventProcessor.iterateExtensionMethodsByUDA!(served.utils.events.protocolNotification, served.types.lspRouter.eventProcessor.emitProtocol!(served.utils.events.protocolNotification, served.types.lspRouter.processNotify(served.lsp.protocol.RequestMessage).__lambda3, false).emitProtocol(immutable(char)[], std.json.JSONValue).__lambda4, false).iterateExtensionMethodsByUDA() [0x1023e0e47]
??:? void served.types.lspRouter.processNotify(served.lsp.protocol.RequestMessage) [0x1023ab9f7]
??:? void served.types.lspRouter.gotNotify(served.lsp.protocol.RequestMessage).__lambda2() [0x1023ac20b]
??:? fiber_entryPoint [0x102b33997]
??:? fiber_trampoline [0x102b4f097]
2021-11-23T10:29:09.161 [error] extension.d:811:delayedProjectActivation Exception starting dub: object.Exception@/Users/pavels/.dub/packages/workspace-d-3.6.1/workspace-d/source/workspaced/com/dub.d(242): Cannot use dub with invalid configuration
----------------
??:? const void workspaced.com.dub.DubComponent.validateConfiguration() [0x1026df8fb]
??:? void served.extension.delayedProjectActivation(workspaced.backend.WorkspaceD.Instance, immutable(char)[], immutable(char)[], served.extension.RootSuggestion) [0x102429377]
??:? void served.extension.doStartup(immutable(char)[]).lazyLoadCallback(workspaced.backend.WorkspaceD.Instance, immutable(char)[], immutable(char)[], served.extension.RootSuggestion).__lambda5() [0x102428e43]
??:? const void served.backend.lazy_workspaced.LazyWorkspaceD.LazyInstance.accessCheck() [0x102450a4b]
??:? const nothrow bool served.backend.lazy_workspaced.LazyWorkspaceD.LazyInstance.checkHasComponent(workspaced.api.ComponentInfo) [0x10245114b]
??:? void served.extension.changedConfig(immutable(char)[], immutable(char)[][], served.types.Configuration, bool, ulong, ulong) [0x102418fdb]
??:? void served.extension.processConfigChange(served.types.Configuration) [0x10241c67b]
??:? void served.extension.didChangeConfiguration(served.lsp.protocol.DidChangeConfigurationParams) [0x1023e1adf]
??:? void served.types.lspRouter.eventProcessor.emitProtocol!(served.utils.events.protocolNotification, served.types.lspRouter.processNotify(served.lsp.protocol.RequestMessage).__lambda3, false).emitProtocol(immutable(char)[], std.json.JSONValue).__lambda4!(immutable(char)[], void function(served.lsp.protocol.DidChangeConfigurationParams)*, served.utils.events.protocolNotification).__lambda4(immutable(char)[], void function(served.lsp.protocol.DidChangeConfigurationParams)*, served.utils.events.protocolNotification).callSymbol() [0x1023e14a7]
??:? void served.types.lspRouter.processNotify(served.lsp.protocol.RequestMessage).__lambda3!(immutable(char)[], void delegate(), served.utils.events.protocolNotification).__lambda3(immutable(char)[], void delegate(), served.utils.events.protocolNotification) [0x1023e1533]
??:? bool served.types.lspRouter.eventProcessor.iterateExtensionMethodsByUDA!(served.utils.events.protocolNotification, served.types.lspRouter.eventProcessor.emitProtocol!(served.utils.events.protocolNotification, served.types.lspRouter.processNotify(served.lsp.protocol.RequestMessage).__lambda3, false).emitProtocol(immutable(char)[], std.json.JSONValue).__lambda4, false).iterateExtensionMethodsByUDA() [0x1023e0e47]
??:? void served.types.lspRouter.processNotify(served.lsp.protocol.RequestMessage) [0x1023ab9f7]
??:? void served.types.lspRouter.gotNotify(served.lsp.protocol.RequestMessage).__lambda2() [0x1023ac20b]
??:? fiber_entryPoint [0x102b33997]
??:? fiber_trampoline [0x102b4f097]
2021-11-23T10:29:09.162 [error] extension.d:819:delayedProjectActivation Failed starting dub in RootSuggestion("/Users/pavels/Dev/Gini/general/document-sender-app", true) - falling back to fsworkspace
2021-11-23T10:29:09.162 [info] extension.d:848:delayedProjectActivation Root RootSuggestion("/Users/pavels/Dev/Gini/general/document-sender-app", true) initialized in 64 ms, 917 μs, and 4 hnsecs
2021-11-23T10:29:09.175 [error] jsonrpc.d:442:showErrorMessage Error message: Could not initialize dub for /Users/pavels/Dev/Gini/general/document-sender-app. Falling back to limited functionality!
Cannot use dub with invalid configuration
Warning: unimplemented DScanner reason, assuming warning: dscanner.unused_result
2021-11-23T10:29:09.498 [info] extension.d:927:startDCDServer Imports for /Users/pavels/Dev/Gini/general/document-sender-app: ["/Users/pavels/Dev/Gini/general/document-sender-app", "/Users/pavels/Dev/Gini/general/document-sender-app/source"]
2021-11-23T10:29:09.501 [info] dcd.d:239:__lambda15 DCD-Server stopped with code 1
2021-11-23T10:29:09.501 [info] dcd.d:242:__lambda15 Broadcasting dcd server crash.
2021-11-23T10:29:09.533 [info] extension.d:927:startDCDServer Imports for /Users/pavels/Dev/Gini/general/document-sender-app: ["/Users/pavels/Dev/Gini/general/document-sender-app", "/Users/pavels/Dev/Gini/general/document-sender-app/source"]
2021-11-23T10:29:09.535 [info] dcd.d:239:__lambda15 DCD-Server stopped with code 1
2021-11-23T10:29:09.535 [info] dcd.d:242:__lambda15 Broadcasting dcd server crash.
2021-11-23T10:29:09.568 [info] extension.d:927:startDCDServer Imports for /Users/pavels/Dev/Gini/general/document-sender-app: ["/Users/pavels/Dev/Gini/general/document-sender-app", "/Users/pavels/Dev/Gini/general/document-sender-app/source"]
2021-11-23T10:29:09.570 [info] dcd.d:239:__lambda15 DCD-Server stopped with code 1
2021-11-23T10:29:09.570 [info] dcd.d:242:__lambda15 Broadcasting dcd server crash.
2021-11-23T10:29:09.605 [info] extension.d:927:startDCDServer Imports for /Users/pavels/Dev/Gini/general/document-sender-app: ["/Users/pavels/Dev/Gini/general/document-sender-app", "/Users/pavels/Dev/Gini/general/document-sender-app/source"]
2021-11-23T10:29:09.607 [info] dcd.d:239:__lambda15 DCD-Server stopped with code 1
2021-11-23T10:29:09.607 [info] dcd.d:242:__lambda15 Broadcasting dcd server crash.
2021-11-23T10:29:09.640 [info] extension.d:927:startDCDServer Imports for /Users/pavels/Dev/Gini/general/document-sender-app: ["/Users/pavels/Dev/Gini/general/document-sender-app", "/Users/pavels/Dev/Gini/general/document-sender-app/source"]
2021-11-23T10:29:09.642 [info] dcd.d:239:__lambda15 DCD-Server stopped with code 1
2021-11-23T10:29:09.642 [info] dcd.d:242:__lambda15 Broadcasting dcd server crash.
2021-11-23T10:29:09.677 [info] extension.d:927:startDCDServer Imports for /Users/pavels/Dev/Gini/general/document-sender-app: ["/Users/pavels/Dev/Gini/general/document-sender-app", "/Users/pavels/Dev/Gini/general/document-sender-app/source"]
Here is my current config:
{
"d.servedPath": "/Users/pavels/.vscode/extensions/webfreak.code-d-0.23.1/bin/serve-d/serve-d",
"d.dcdClientPath": "/Users/pavels/.code-d/bin/dcd-client",
"d.dcdServerPath": "/Users/pavels/.code-d/bin/dcd-server",
"workbench.editorAssociations": {
"*.ipynb": "jupyter-notebook"
},
"files.watcherExclude": {
"**/.bloop": true,
"**/.metals": true,
"**/.ammonite": true
},
"workbench.startupEditor": "newUntitledFile",
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"d.dubPath": "/usr/local/bin/dub",
"d.dubCompiler": "ldc",
"d.dmdPath": "",
"d.forceUpdateServeD": false,
"d.enableDMDImportTiming": true,
"workbench.colorTheme": "Base16 Dark Ocean",
"python.condaPath": "/Users/pavels/miniforge3/bin/conda",
"python.defaultInterpreterPath": "/Users/pavels/miniforge3/bin/python",
"python.formatting.provider": "black",
"files.trimTrailingWhitespace": true,
"editor.minimap.enabled": false,
"editor.formatOnSave": true,
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"d.stdlibPath": "auto",
"d.alwaysShowDubStatusButtons": true,
"d.argumentSnippets": true,
"d.dubArchType": "AArch64",
"d.manyProjectsThreshold": 3
}
first try commenting out the dmdPath
setting (so it's not set at all)
If that doesn't fix it then I think this is a bug in workspace-d/serve-d that I need to fix because for some reason DUB tries to setup dmd as compiler / detected it automatically - which is a bug because dubCompiler is set to LDC so it should start with LDC instead of DMD.
I removed the dmdPath
from the config (I also forced a rebuilt) and also made sure it is empty in the preferences -> settings -> extensions -> D but it didn't help unfortunately.
Dub Error (ignored): object.Exception@/Users/pavels/.dub/packages/dub-1.26.1/dub/source/dub/compilers/compiler.d(134): Failed to invoke the compiler dmd to determine the build platform: /bin/sh: dmd: command not found
has been fixed (from source or in the new release soon)
@WebFreak001 has it been released?
only if you change to the beta/nightly branch - stable doesn't have this yet