jetbrains: drop bundled plugins#470147
Conversation
093384b to
8eb970b
Compare
8eb970b to
3998cdd
Compare
|
I agree with this approach. |
If they are hard to maintain, or aren't actively maintained, then I agree they should be dropped. I did enjoy the convenience of
It'd be great if we could actually make it easier to use
Off-topic, but does a separate |
There is https://github.com/nix-community/nix-jetbrains-plugins which I recently moved to nix-community and can pretty much do that for you: {
environment.systemPackages = with nix-jetbrains-plugins.lib."${system}"; [
# Adds the latest IDEA version with the latest compatible version of "com.intellij.plugins.watcher".
(buildIdeWithPlugins pkgs.jetbrains "idea" ["com.intellij.plugins.watcher"])
];
}It just doesn't have any of the special plugins code, it's just the plugins straight up from the repo. But I have never ran into any plugin that doesn't just work. We could allow contributions over there to allow a similiar "special plugins" logic, but I just fear nobody would maintain it. For the few that need special things, those reportedly always just have worked when installed through the IDE, which IMO is a perfectly fine workaround for the handful of plugins that need it.
True! We should do that in a follow-up PR |
leona-ya
left a comment
There was a problem hiding this comment.
I agree with this change, the plugins are awful to maintain
3998cdd to
81c9618
Compare
MattSturgeon
left a comment
There was a problem hiding this comment.
Removing plugins SGTM. I've reviewed the relevant documentation below:
81c9618 to
38c6630
Compare
|
@MattSturgeon Thanks for your suggestions, I applied them. |
MattSturgeon
left a comment
There was a problem hiding this comment.
I spotted a minor issue with the error message that doesn't make as much sense now that addPlugins doesn't do plugin resolution. (I should really have noticed this in my earlier review, sorry!)
Otherwise, LGTM. Are you good for this to be merged when resolved, or do you want to wait for further input?
| if lib.isDerivation plugin then | ||
| plugin | ||
| else if byId ? "${plugin}" then | ||
| byId."${plugin}" ide.pname ide.buildNumber | ||
| else if byName ? "${plugin}" then | ||
| byName."${plugin}" ide.pname ide.buildNumber | ||
| else | ||
| throw "Could not resolve plugin ${plugin}"; | ||
| throw "Could not resolve plugin ${plugin}. Note that plugins can no longer be added by name/ID since NixOS 26.05."; |
There was a problem hiding this comment.
We could simplify to lib.throwIfNot (lib.isDerivation plugin) "..." plugin
There was a problem hiding this comment.
Also, this error should no longer be about "resolving pulgins". Instead it should be a deprecation notice along the lines of
addPluginsno longer supports resolving plugin name or id strings. Please supply a derivation instead.
| if lib.isDerivation plugin then | |
| plugin | |
| else if byId ? "${plugin}" then | |
| byId."${plugin}" ide.pname ide.buildNumber | |
| else if byName ? "${plugin}" then | |
| byName."${plugin}" ide.pname ide.buildNumber | |
| else | |
| throw "Could not resolve plugin ${plugin}"; | |
| throw "Could not resolve plugin ${plugin}. Note that plugins can no longer be added by name/ID since NixOS 26.05."; | |
| lib.throwIfNot (lib.isDerivation) "addPlugins no longer supports resolving plugin name or id strings. Please supply a derivation instead" plugin; |
(will probably need formatting, may benefit from improved wording)
Co-authored-by: Matt Sturgeon <[email protected]>
38c6630 to
1daa63c
Compare
|
I think we can merge this. |
The bundled plugins in nixpkgs are kinda a headache to maintain (especially the "special plugins") and are updated very infrequently (along with IDE updates).
This PR drops them. This is a discussion, feel free to voice your opinion! I however don't think that bundling these inside of nixpkgs itself is much of an advantage. Having them outside of nixpkgs allows for much faster updates and makes maintaining the Jetbrains stack in general much easier.
I also plan to add support for
updateScript/rryan-tmand having to also update all plugins every time would lead to merge conflicts all the time.This does not remove the
addPluginsfunction. It is still possible to add plugins by providing the source to them.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.