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

Raise if Plug is missing #446

Merged
merged 2 commits into from
Jun 20, 2024
Merged

Raise if Plug is missing #446

merged 2 commits into from
Jun 20, 2024

Conversation

josevalim
Copy link
Contributor

@jonatanklosko I wonder how hard it would be for us to add a special exception that automatically injects a button that allows us to click it and the dependency is automatically added. :)

@wojtekmach
Copy link
Contributor

Like Plug.Exception.actions/1?

@jonatanklosko
Copy link
Member

FTR we discussed we could add Kino.MissingPackagesError (similar to a few other exceptions we have), but it would be nice to have something more generic, because this kind of exception is more common to be raised by packages with optional dependencies (also, having a dedicated exception just for this one case is a bit of an overkill). We could have a heuristic matching on RuntimeError message, but that's not reliable. Finally, we could have a more specific error in Elixir, but it's weird that the package requirement is really about Mix. For now we are sticking to the regular exception.

@jonatanklosko jonatanklosko merged commit e701ceb into main Jun 20, 2024
1 check passed
@jonatanklosko jonatanklosko deleted the jv-plug-raise branch June 20, 2024 12:46
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.

3 participants