LuaLS / LuaLS/vscode-lua

Cannot install addons that aren't installed that are defined by a `${addon}` path in `.luarc.json`

Open
#159 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

addon manager enhancement
Dominant language
TypeScript
Stars
215
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Which OS are you using?

Windows

### Expected Behaviour

An "Install" button on the addon

### Actual Behaviour

A "Disable" button that when clicked errors

### Reproduction steps

1. Have no addons installed through the addon manager
2. Open a folder that already has a `.luarc.json` with `workspace.library` pointing to a path with `${addons}` placeholder (e.g. `"${addons}/garrysmod/module/library"`)
3. Try to install the addon through the addon manager to see that you only get a "Disable" button

### Additional Notes

The only workaround is to open another folder/workspace and then enable the addon manually.

It would also be nice to have a settings option you can throw into `.vscode/settings.json` to prompt the user to install addons required by the folder/workspace if they don't already have it installed.

### Log

Log

#### STARTUP ####

[2024-11-13 12:15:25] | DEBUG | GENERAL | Starting language server
[2024-11-13 12:15:25] | DEBUG | GENERAL | Language server has started
[2024-11-13 12:15:25] | DEBUG | WebVue | Workspace Open: true
[2024-11-13 12:15:25] | DEBUG | Filesystem | Created directory at "/C:/Users/c/AppData/Roaming/VSCodium/User/globalStorage/sumneko.lua/addonManager"
[2024-11-13 12:15:25] | VERBOSE | Command | Executing "getAddons" ({"command":"getAddons","data":{"page":1}})
[2024-11-13 12:15:26] | ERROR | Addon Manager | Failed to fetch addons! Please check your connection to GitHub.
[2024-11-13 12:15:26] | ERROR | Addon Manager | Cannot rebase onto multiple branches.
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found ao
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found argparse
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found bee
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found busted
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found cc-tweaked
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found cocos4.0
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found devilspie2
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found dkjson
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found dontstarve
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found fenster
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found fivem
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found garrysmod
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found halion
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found lapis
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found lldebugger
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found lmathx
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found love-nuklear
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found love2d
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found lovr
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found lpeg
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found lua-cjson
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found luaecs
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found luafilesystem
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found luaharfbuzz
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found lualogging
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found luasocket
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found luassert
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found luaunit
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found luazip
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found luvit
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found lzlib
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found md5
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found minetest
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found mirai
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found moneymoney
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found moonloader
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found nodemcu-esp32
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found nodemcu-esp8266
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found openresty
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found penlight
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found powder-toy
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found RavenscriptIDEA
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found RavenscriptIDEA_withRavenM
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found REFramework-LLS
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found skynet
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found slnunicode
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found smbx2-lunalua
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found starfallex
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found StormworksAddonLua
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found tex-lualatex
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found tex-lualibs
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found tex-luametatex
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found tex-luatex
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found toml-edit
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found transformice
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found trilogyloader
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found TTSLua
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found umbrella
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found unbound-api
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found xmake
[2024-11-13 12:15:26] | VERBOSE | Addon Manager | Found yue
[2024-11-13 12:15:26] | WARN | Git | Failed to pull LLS-Addons!
[2024-11-13 12:15:26] | ERROR | Filesystem | Unable to resolve nonexistent file 'vscode-userdata:/c:/Users/c/AppData/Roaming/VSCodium/User/globalStorage/sumneko.lua/addonManager/addons/garrysmod/module'
[2024-11-13 12:15:27] | ERROR | Filesystem | Unable to resolve nonexistent file 'vscode-userdata:/c:/Users/c/AppData/Roaming/VSCodium/User/globalStorage/sumneko.lua/addonManager/addons/garrysmod/module'
[2024-11-13 12:15:32] | DEBUG | WebVue | Workspace Open: true
[2024-11-13 12:15:32] | DEBUG | Filesystem | Created directory at "/C:/Users/c/AppData/Roaming/VSCodium/User/globalStorage/sumneko.lua/addonManager"
[2024-11-13 12:15:32] | VERBOSE | Command | Executing "getAddons" ({"command":"getAddons","data":{"page":1}})
[2024-11-13 12:15:32] | ERROR | Filesystem | Unable to resolve nonexistent file 'vscode-userdata:/c:/Users/c/AppData/Roaming/VSCodium/User/globalStorage/sumneko.lua/addonManager/addons/garrysmod/module'
[2024-11-13 12:15:32] | ERROR | Filesystem | Unable to resolve nonexistent file 'vscode-userdata:/c:/Users/c/AppData/Roaming/VSCodium/User/globalStorage/sumneko.lua/addonManager/addons/garrysmod/module'
[2024-11-13 12:16:33] | VERBOSE | Command | Executing "disable" ({"command":"disable","data":{"name":"garrysmod"}})
[2024-11-13 12:16:33] | WARN | Addon | "garrysmod" is already disabled
[2024-11-13 12:16:33] | ERROR | Filesystem | Unable to resolve nonexistent file 'vscode-userdata:/c:/Users/c/AppData/Roaming/VSCodium/User/globalStorage/sumneko.lua/addonManager/addons/garrysmod/module'
[2024-11-13 12:16:33] | ERROR | Filesystem | Unable to resolve nonexistent file 'vscode-userdata:/c:/Users/c/AppData/Roaming/VSCodium/User/globalStorage/sumneko.lua/addonManager/addons/garrysmod/module'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the addon manager's handling of the .luarc.json workspace.library path and the getAddons, install, and disable entry points described in the report. Reproduce the Windows case with ${addons} while no addons are installed, then verify that the addon shows an Install button and can be installed without the nonexistent-path error.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.