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): lldb library paths are strings #74

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

bas-ie
Copy link
Contributor

@bas-ie bas-ie commented Nov 28, 2023

Description of changes

This:

  • switches paths back to strings, lldb is fussy about this apparently

I can't promise this is also true for code-lldb? But it seems likely. Tests are still green.

Fixes #73

Things done

Copy link
Owner

@mrcjkb mrcjkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: We'll have to make this dependent on whether we're using lldb (adapter.type == 'executable') or codelldb (adapter.type == 'server'), otherwise it'll error with codelldb (see this review comment).

I would suggest to convert the map into a list of strings if (adapter.type == 'executable').

@mrcjkb
Copy link
Owner

mrcjkb commented Nov 28, 2023

PS, do you have a project I can test this on (ideally with steps to reproduce, for when I implement an integration test)?

@bas-ie
Copy link
Contributor Author

bas-ie commented Nov 28, 2023

Yeah, good idea: I'll see what the smallest possible example with dynamic linking is, no sense in throwing all of Bevy at it.

@bas-ie
Copy link
Contributor Author

bas-ie commented Nov 28, 2023

(see #64 (review)).

Shoot, sry I missed that one in all the confusion 🙂

@bas-ie
Copy link
Contributor Author

bas-ie commented Nov 28, 2023

https://github.com/richchurcher/test-rustaceanvim reproduces the problem. I forgot that there's a dynamic linking feature in Bevy specifically, so did need to include it. Let me know if you want me to leave it there indefinitely or remove it.

@mrcjkb
Copy link
Owner

mrcjkb commented Nov 28, 2023

https://github.com/richchurcher/test-rustaceanvim reproduces the problem. I forgot that there's a dynamic linking feature in Bevy specifically, so did need to include it. Let me know if you want me to leave it there indefinitely or remove it.

Thanks 🙏

I'll have to pick this up on Friday, but if you're okay with it, we can add it to this repo under a spec/fixtures/dap/dynamic-libs directory.

lldb-dap needs a list of strings, codelldb needs a map.
Fixes mrcjkb#73.
@bas-ie
Copy link
Contributor Author

bas-ie commented Nov 28, 2023

I'll have to pick this up on Friday, but if you're okay with it, we can add it to this repo under a spec/fixtures/dap/dynamic-libs directory.

💯

The latest commit seems to do the trick. Managing a codelldb install is a giant PITA though... is that something the nix flakes can help with? I can confirm it works with lldb-dap.

@bas-ie bas-ie requested a review from mrcjkb November 28, 2023 20:30
@mrcjkb
Copy link
Owner

mrcjkb commented Nov 28, 2023

The latest commit seems to do the trick.

Just tested it with codelldb and lldb (using your test project) and it works for both on my machine.
Thanks for the great work! 🙏

Managing a codelldb install is a giant PITA though... is that something the nix flakes can help with?

The codelldb standalone adapter is currently broken in nixpkgs (it only works when used with the VSCode plugin). I have an open PR that fixes it, but it's a bit hacky.
For now, I've been running:

nix shell "github:mrcjkb/nixpkgs/codelldb-fix#vscode-extensions.vadimcn.vscode-lldb.adapter"

to enter a shell with the adapter from my fork.
There's also an AUR package for Arch (which I haven't tested).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic linking breaks again
2 participants