Skip to content

Commit

Permalink
fix(dap): nil error on rust-analyzer debugSingle/debuggables last
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Jan 19, 2024
1 parent ea10533 commit dcd8c9a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.16.2] - 2024-01-19

### Fixed

- DAP: `nil` error when executing `rust-analyzer.debugSingle`
or `:RustLsp debuggables last` commands (introduced in 3.16.0).

## [3.16.1] - 2024-01-17

### Fixed
Expand Down
10 changes: 8 additions & 2 deletions lua/rustaceanvim/dap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,15 @@ local function handle_configured_options(adapter, args)
end

---@param args RADebuggableArgs
---@param verbose boolean
---@param callback fun(config: DapClientConfig)
---@param verbose? boolean
---@param callback? fun(config: DapClientConfig)
function M.start(args, verbose, callback)
if verbose == nil then
verbose = true
end
if type(callback) ~= 'function' then
callback = dap.run
end
local adapter = types.evaluate(config.dap.adapter)
--- @cast adapter DapExecutableConfig | DapServerConfig | disable
if adapter == false then
Expand Down

0 comments on commit dcd8c9a

Please sign in to comment.