The Gram Code Editor - 2026-09-30


  1. krig

    Great, I saw your PR. We require signed commits so didn’t check but if you can please sign your commit, but yeah it looks good to me

  2. ashleytg

    i converted someone to gram >:3

  3. frafav

    > Great, I saw your PR. We require signed commits so didn’t check but if you can please sign your commit, but yeah it looks good to me I think I've done it. I just --amend --signoff. is this Ok? ↺

  4. krig

    @frafav ah no signoff is something different. There is a guide here: https://docs.gitlab.com/user/project/repository/signed_commits/ssh/

  5. nicoco

    oh, I didn't know signed commits were mandatory

  6. nicoco

    I never set that up, it's the opportunity I guess

  7. krig

    yeah it’s gotten easier now that signing with SSH keys is possible, someone asked for it and I hadn’t set it up myself either so I decided that it was worth giving it a go

  8. nicoco

    When I build from source, the python debugger does not work: > ERROR [debugger_ui::debugger_panel] No debugpy adapter found and allow_binary_download not set When I use the prebuilt binaries it works. Has something changed? Or should I build differently than just `cargo build`?

  9. nicoco

    > yeah it’s gotten easier now that signing with SSH keys is possible, someone asked for it and I hadn’t set it up myself either so I decided that it was worth giving it a go hmm I will set up opengpg I think, since I plan to dive into this a little bit for an XMPP/Deltachat gateway :) ↺

  10. krig

    Yes, something HAS changed! I have found more ways that the editor sneakily downloads and installs stuff behind our backs, and have been plugging those holes.

  11. nicoco

    > Yes, something HAS changed! I have found more ways that the editor sneakily downloads and installs stuff behind our backs, and have been plugging those holes. oh ok. but it should be available without download, since with latest prebuilt gram binaries the debugger just works? ↺

  12. krig

    It has also unfortunately made the editor a lot more painful to use. This is really the main thing holding back the next release. I want to figure out a better user experience around permissions, and there are still holes in the security model

  13. krig

    no in 3.3.0, the editor will just silently download stuff to get the debugger working

  14. krig

    but on main, you need to allow it. The debugger adapters are listed in the language server configuration view as well right now, as a temporary fix

  15. nicoco

    > no in 3.3.0, the editor will just silently download stuff to get the debugger working yeah but what I mean is that on this machine, the stuff has already been downloaded so shouldn't it be used? or does it download it every time I launch the debugger!? ↺

  16. krig

    because of how the APIs work, the check happens before it even looks to see if anything is already downloaded

  17. nicoco

    oh I see, thanks for the explanation

  18. nicoco

    2026-09-30T09:34:50+02:00 INFO [dap::transport] Debug adapter has connected to TCP server 127.0.0.1:40005 2026-09-30T09:34:50+02:00 ERROR [debugger_ui::debugger_panel] error: process exited before debugger attached. I allowed the download but it crashes without a useful message, I'll investigate a little bit…

  19. krig

    hmm that seems unrelated.. but try restarting after giving permission if you haven’t

  20. nicoco

    a restart did not change anything. guess it's time for me to dig into how DAP/debugpy works :)

  21. krig

    hm. I have only tried the codelldb/rust debugger after making the changes, maybe I have broken something.. not at all impossible

  22. nicoco

    do you have an idea which commit might have broken it? I'm struggling to even understand which `debugpy` "binary" is even used by gram -_-

  23. krig

    I bet there is an npm package involved somehow…. will take a look

  24. krig

    ah no it’s a python wheel it’s downloading

  25. nicoco

    slightly more sane than going through npm :)

  26. nicoco

    I found something interesting with a debug build: 2026-09-30T10:42:22+02:00 INFO [dap::transport] Debug adapter has connected to TCP server 127.0.0.1:46653 2026-09-30T10:42:22+02:00 DEBUG [dap::transport] stderr: Content-Length: 138 2026-09-30T10:42:22+02:00 DEBUG [dap::transport] stderr: 2026-09-30T10:42:22+02:00 DEBUG [dap::transport] stderr: {"seq": 1, "type": "event", "event": "output", "body": {"category": "telemetry", "output": "ptvsd", "data": {"packageVersion": "1.8.22"}}}

  27. nicoco

    Isn't it weird that this json payload is in stderr? intuitively, I believe this should go through the tcp socket instead

  28. krig

    yeah seems odd

  29. krig

    but not clearly an error? hm

  30. nicoco

    maybe debugpy has a stdin/stdout mode and a tcp mode, and somehow gram launches it in stdin/stdout mode instead of TCP?

  31. nicoco

    but then "Debug adapter has connected to TCP server 127.0.0.1:46653" is surprising…

  32. krig

    yeah sounds like maybe something has changed that makes it disconnect on the first message or something

  33. krig

    So many issues with the code around the debug adapter to work out.. first off it’s just throwing away the relevant error when the connection fails, second it’s just downloading the latest release so totally could be something that has changed in debugpy itself

  34. nicoco

    alright I have a fix

  35. krig

    ah nice

  36. nicoco

    with the new dap settings in the config file

  37. nicoco

    when user_args is unset, debugpy is called without the proper CLI args

  38. krig

    aah

  39. nicoco

    I don't know if my fix is good, but it's ```diff - pub args: Vec<String>, + pub args: Option<Vec<String>>, - args: content.args.unwrap_or_default(), + args: content.args, ``` for dap/src/settings.rs

  40. nicoco

    and ```diff - let user_args = dap_settings.map(|s| s.args.clone()); + let user_args = dap_settings.and_then(|s| s.args.clone()); ``` in crates/project/src/debugger/dap_store.rs

  41. nicoco

    btw something's off with the formatter settings, I don't do rust at all so I have not tweaked any config, and yet when I edit gram code with gram, it reformats parts I don't touch, eg: ```diff - binary: content - .binary - .map_or_else(|| DapBinary::Default, DapBinary::Custom), + binary: content.binary.map_or_else(|| DapBinary::Default, DapBinary::Custom), ```

  42. nicoco

    I don't know if the checked in gram/rust-format settings are wrong, or if it's you committing files that aren't formatted according to the defined rules

  43. nicoco

    that's where pre-commit hooks are nice :)

  44. krig

    hmm yeah… let me see what happens if I run cargo fmt —all

  45. krig

    hah yeah.. not sure when that changed

  46. nicoco

    shall I open a PR with the 2 diffs above? I _think_ it makes sense but man is the codebase complex. What I don't like is that it touches `crates/project/src/debugger/dap_store.rs` which was not touched by recent commits, so maybe the fix should be elsewhere.

  47. krig

    let me see, I think the fix should be to change DapSettings to make the individual fields Option<>.. right now it assumes that if the dap settings object exists, all the fields are valid

  48. krig

    so adding the permission fields is what broke it

  49. nicoco

    yes, that is my conclusion too

  50. nicoco

    I guess if I had debugpy installed in the project's venv, I would have needed to add the dap entry in config.jsonc and it would have worked (provided gram actually picks up debugpy without downloading it when available, which I think happens from my skimming through the code) ✎

  51. nicoco

    I guess if I had debugpy installed in the project's venv, I would not have needed to add the dap entry in config.jsonc and it would have worked (provided gram actually picks up debugpy without downloading it when available, which I think happens from my skimming through the code) ✏

  52. nicoco

    alright I'll use my dirty fix for now, and let you fix this however you want then :) I don't care about taking credit for the investigation, you commit and it's fine!

    ❤️ 1
  53. krig

    I’ll set you as Co-Authored-by: if that’s OK, will go through the other debug adapters and make sure they don’t do anything weird.. and also make the same change for user_env

  54. nicoco

    I'm fine but I hope I'll be able to handle the fame & money that'll come with that. ✎

  55. nicoco

    I'm fine with that but I hope I'll be able to handle the fame & money that'll come with that. ✏

  56. nicoco

    I'm fine with that but I hope I'll be able to handle the fame & money that'll come with it. ✏

  57. nicoco

    I managed to sign my commits in my "commit hook" PR, yoohoo! now there will be a green 🔒 next to stuff I push to codeberg, that'll look more professional! ^^

  58. krig

    lol

  59. ashleytg

    where is Gram hosted?

  60. ashleytg

    > I managed to sign my commits in my "commit hook" PR, yoohoo! now there will be a green 🔒 next to stuff I push to codeberg, that'll look more professional! ^^ nvm 😭

  61. ashleytg

    i love codeberg!

    🩵 1
  62. krig

    yes, codeberg 👏

    🧊 1
  63. ashleytg

    DF

  64. ashleytg retracted a previous message, but it's unsupported by your client.

  65. frafav

    > @frafav ah no signoff is something different. There is a guide here: https://docs.gitlab.com/user/project/repository/signed_commits/ssh/ ohh, I didn't know, I've set the option as default ↺

    👍 1
  66. frafav

    I also had to verify the key :P. it's 15 years that I'm using git and I knoe basically 1% of these security quirks

  67. krig

    hehe yeah I had never used it before either..