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

What does providers being deprecated mean for plugins? #292

Open
zachdaniel opened this issue Mar 16, 2024 · 2 comments
Open

What does providers being deprecated mean for plugins? #292

zachdaniel opened this issue Mar 16, 2024 · 2 comments

Comments

@zachdaniel
Copy link
Contributor

Just saw this warning: ElixirSense.suggestions/3 is deprecated. providers will be dropped in the future.

What does this mean for ElixirSense's plugin setup? We utilize this heavily for Ash Framework.

@lukaszsamson
Copy link
Collaborator

@zachdaniel Provider code has been moved to ElixirLS in almost not changed form. I don't currently plan to break compatibility with the plugins but I'm unhappy with some aspects

  1. The current approach scans all modules for plugins on each complete request. This introduces noticeable delay as it reaches over the code server. We need a better plugin registration mechanism.
  2. Plugins are currently the most common crash reason. When a plugin loads it unloads elixir_sense modules from the ElixirLS release. It loads it's own older version of those modules and since then ElixirLS breaks in weirdest places with UndefinedFunctionError, MatchError. Loading a plugin must not unload/overwrite ElixirLS internal modules. ElixirSense.Plugin behaviour will either need to be extracted to a separate library (and renamed to ElixirLS.Plugin) or the plugins should not implement it explicitly.
  3. So far the plugin architecture only supports completions but we already have a need for definitions plugin.

@zachdaniel
Copy link
Contributor Author

This all sounds great to me 👍. I’ve got no issue reworking our plugin to meet a new api, and I’ve also got no problem if there is like an “install” step that users have to do, like putting something in their config. Let me know how I can help on this front :)

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

No branches or pull requests

2 participants