Skip to content

Commit 047f9c9

Browse files
authored
fix(dap): account for removed cargoExtraArgs (#450)
1 parent 0b52abb commit 047f9c9

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [4.26.1] - 2024-07-10
10+
11+
### Fixed
12+
13+
- DAP: rust-analyzer [removed the `cargoExtraArgs` field](https://github.com/rust-lang/rust-analyzer/pull/17547),
14+
which is a breaking change.
15+
916
## [4.26.0] - 2024-07-07
1017

1118
### Added

lua/rustaceanvim/commands/debuggables.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ local function build_label(args)
2323
ret = ret .. value .. ' '
2424
end
2525

26-
for _, value in ipairs(args.cargoExtraArgs) do
26+
for _, value in ipairs(args.cargoExtraArgs or {}) do
2727
ret = ret .. value .. ' '
2828
end
2929

lua/rustaceanvim/dap.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ local function get_cargo_args_from_runnables_args(runnable_args)
4343
table.insert(cargo_args, message_json)
4444
end
4545

46-
for _, value in ipairs(runnable_args.cargoExtraArgs) do
46+
for _, value in ipairs(runnable_args.cargoExtraArgs or {}) do
4747
if not compat.list_contains(cargo_args, value) then
4848
table.insert(cargo_args, value)
4949
end

lua/rustaceanvim/runnables.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ end
2323
---@class RARunnableArgs
2424
---@field workspaceRoot string
2525
---@field cargoArgs string[]
26-
---@field cargoExtraArgs string[]
26+
---@field cargoExtraArgs? string[]
2727
---@field executableArgs string[]
2828

2929
---@param option string

0 commit comments

Comments
 (0)