Skip to content

Commit

Permalink
fix(dap): account for removed cargoExtraArgs (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored Jul 10, 2024
1 parent 0b52abb commit 047f9c9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 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).

## [4.26.1] - 2024-07-10

### Fixed

- DAP: rust-analyzer [removed the `cargoExtraArgs` field](https://github.com/rust-lang/rust-analyzer/pull/17547),
which is a breaking change.

## [4.26.0] - 2024-07-07

### Added
Expand Down
2 changes: 1 addition & 1 deletion lua/rustaceanvim/commands/debuggables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ local function build_label(args)
ret = ret .. value .. ' '
end

for _, value in ipairs(args.cargoExtraArgs) do
for _, value in ipairs(args.cargoExtraArgs or {}) do
ret = ret .. value .. ' '
end

Expand Down
2 changes: 1 addition & 1 deletion lua/rustaceanvim/dap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ local function get_cargo_args_from_runnables_args(runnable_args)
table.insert(cargo_args, message_json)
end

for _, value in ipairs(runnable_args.cargoExtraArgs) do
for _, value in ipairs(runnable_args.cargoExtraArgs or {}) do
if not compat.list_contains(cargo_args, value) then
table.insert(cargo_args, value)
end
Expand Down
2 changes: 1 addition & 1 deletion lua/rustaceanvim/runnables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ end
---@class RARunnableArgs
---@field workspaceRoot string
---@field cargoArgs string[]
---@field cargoExtraArgs string[]
---@field cargoExtraArgs? string[]
---@field executableArgs string[]

---@param option string
Expand Down

0 comments on commit 047f9c9

Please sign in to comment.