Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dap): account for removed cargoExtraArgs #450

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading