syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.66k stars 4.89k forks source link

D layer crashes on flycheck-dmd-dub-set-include-path #16266

Closed stalecu closed 8 months ago

stalecu commented 8 months ago

Description :octocat:

The D lang layer doesn't work properly because of the function in the title not existing.

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: I see "File mode specification error: (void-function flycheck-dmd-dub-set-include-path)" and doesn't do anything from there.

Expected behaviour: :heart: :smile: Said message doesn't show and the LSP is started.

System Info :computer:

Backtrace :paw_prints:

This is from the messages buffer:

Opening file/dir: ~/Code/kilocli/source/app.d
[yas] Prepared just-in-time loading of snippets successfully.
flycheck-dmd-dub [Sun Jan 28 05:34:19 2024]: Setting variables from dub describe
flycheck-dmd-dub [Sun Jan 28 05:34:19 2024]: Cache invalidated, running dub describe.
flycheck-dmd-dub [Sun Jan 28 05:34:19 2024]: Calling dub describe with ’dub describe’
flycheck-dmd-dub [Sun Jan 28 05:34:19 2024]: Caching result of dub describe
flycheck-dmd-dub [Sun Jan 28 05:34:19 2024]: Creating directory /tmp/flddRx1ez9/home/stefan/Code/kilocli/
flycheck-dmd-dub [Sun Jan 28 05:34:19 2024]: Setting variables from JSON string
File mode specification error: (void-function flycheck-dmd-dub-set-include-path)

This happens because the layer supposedly hasn't been updated and that function doesn't exist in flycheck-dmd-dub. It stems from here: https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Blang/d/packages.el#L62. Removing the offending line makes everything work again, I'll make a PR with that fix.