From 4cac51f7c8fe958462a24dc656022990c04cdd9c Mon Sep 17 00:00:00 2001 From: Pavel Skavarodka Date: Sun, 16 Jun 2024 12:49:25 +0200 Subject: [PATCH 1/3] fix(dap): typo in dynamic library path setup --- lua/rustaceanvim/dap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/rustaceanvim/dap.lua b/lua/rustaceanvim/dap.lua index c70641a1..d131891c 100644 --- a/lua/rustaceanvim/dap.lua +++ b/lua/rustaceanvim/dap.lua @@ -202,7 +202,7 @@ local function add_dynamic_library_paths(adapter, workspace_root) elseif shell.is_macos() then ---@diagnostic disable-next-line: missing-parameter environments[workspace_root] = environments[workspace_root] - or format_environment_variable(adapter, 'DKLD_LIBRARY_PATH', { rustc_target_path, target_path }, ':') + or format_environment_variable(adapter, 'DYLD_LIBRARY_PATH', { rustc_target_path, target_path }, ':') else ---@diagnostic disable-next-line: missing-parameter environments[workspace_root] = environments[workspace_root] From c08799e62275a21616e573dae6c2193462c6a537 Mon Sep 17 00:00:00 2001 From: Pavel Skavarodka Date: Sun, 16 Jun 2024 12:51:08 +0200 Subject: [PATCH 2/3] fix(dap): missed cwd parameter in dynamic library path setup --- lua/rustaceanvim/dap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/rustaceanvim/dap.lua b/lua/rustaceanvim/dap.lua index d131891c..33473099 100644 --- a/lua/rustaceanvim/dap.lua +++ b/lua/rustaceanvim/dap.lua @@ -188,7 +188,7 @@ local function add_dynamic_library_paths(adapter, workspace_root) if not workspace_root or environments[workspace_root] then return end - compat.system({ 'rustc', '--print', 'target-libdir' }, nil, function(sc) + compat.system({ 'rustc', '--print', 'target-libdir' }, { cwd = workspace_root }, function(sc) ---@cast sc vim.SystemCompleted local result = sc.stdout if sc.code ~= 0 or result == nil then From d1b6bd9d8c8d8765016da2c064381b763a265156 Mon Sep 17 00:00:00 2001 From: Pavel Skavarodka Date: Sun, 16 Jun 2024 13:31:31 +0200 Subject: [PATCH 3/3] docs(changelog): fix description added to unreleased --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11f75f68..d90d14a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ 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). +## [Unreleased] + +### Fixed + +- DAP: Dynamic library path setup using nigthly rust builds + (stable rustc was always used due to missed cwd parameter). +- DAP: Dynamic linking on macOS didn't work due to a typo in + `DYLD_LIBRARY_PATH` constant. + ## [4.24.1] - 2024-06-15 ### Fixed