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

Intellij Idea: depend on system Go debugger delve #188488

Closed
wants to merge 1 commit into from

Conversation

silasdavis
Copy link
Contributor

@silasdavis silasdavis commented Aug 27, 2022

Given the size of the overall Intellij Idea build and after discussion
with @Mic92 we thought it was reasonable to make idea depend on the
NixOS-packaged version of the Go debugger delve, even though it is only
needed when using the Go plugin.

This is accomplished by setting dlv.path (see this comment on the
Jetbrains issue tracker for reference:
https://youtrack.jetbrains.com/issue/GO-11782/Run-Targets-Debugging-in-a-remote-Docker-container-on-Apple-Silicon-fails#focus=Comments-27-5280341.0-0) which instructs intellij to use a custom dlv binary (i.e. not the one which is bundled with Goland or downloaded by the Plugin which requires various linking fixes.

Note: this patch leaves the existing the postFixup block from the Goland
build which patches the bundled dlv. For Goland the patching approach
has the modest benefits of:

  1. Not showing a popup balloon popup when debugging saying 'using custom dlv...`

  2. Guaranteeing Goland is given access to the exact version of delve with which
    it is bundled.

1 is a fairly minor inconvenience, and in the case of 2 I think delve is reasonably
stable at this point so is unlikely to cause a problem.

It would be possible to use the system dlv for Goland and the Go
plugin if consistency is preferred.

Signed-off-by: Silas Davis silas.davis@monax.io

Description of changes

See above

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Given the size of the overall Intellij Idea build and after discussion
with @Mic92 we thought it was reasonable to make idea depend on the
NixOS-packaged version of the Go debugger delve, even though it is only
needed when using the Go plugin.

This is accomplished by setting `dlv.path` (see this comment on the
Jetbrains issue tracker for reference:
https://youtrack.jetbrains.com/issue/GO-11782/Run-Targets-Debugging-in-a-remote-Docker-container-on-Apple-Silicon-fails#focus=Comments-27-5280341.0-0) which instructs intellij to use a custom `dlv` binary (i.e. not the one which is bundled with Goland or downloaded by the Plugin which requires various linking fixes.

Note: this patch leaves the existing the postFixup block from the Goland
build which patches the bundled `dlv`. For Goland the patching approach
has the modest benefits of:

1. Not showing a popup balloon popup when debugging saying 'using custom dlv...`

2. Guaranteeing Goland is given access to the exact version of delve with which
   it is bundled.

1 is a fairly minor inconvenience, and in the case of 2 I think delve is reasonably
  stable at this point so is unlikely to cause a problem.

It would be possible to use the system `dlv` for Goland and the Go
plugin if consistency is preferred.

Signed-off-by: Silas Davis <silas.davis@monax.io>
@silasdavis silasdavis changed the title Make intellij depend on system Go debugger delve Intellij Idea: depend on system Go debugger delve Aug 27, 2022
@ofborg ofborg bot requested a review from AnatolyPopov August 27, 2022 11:11
@@ -12032,6 +12032,16 @@
fingerprint = "ADF4 C13D 0E36 1240 BD01 9B51 D1DE 6D7F 6936 63A5";
}];
};
silasdavis = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had this lying around and thought I'd add my contact details, not sure if I should be a maintainer for any jetbrains stuff just because of this one change, but I expect to add some other packages so I thought I'd commit this now. Obviously I can pull it out if that is cleaner.

@Janik-Haag
Copy link
Member

@silasdavis are you still interested in getting this merged?

@wegank
Copy link
Member

wegank commented Oct 13, 2023

Merge conflict, please rebase and create a new one for more attention.

@wegank wegank closed this Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants