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

Handling of failing addon entry_points #938

Open
bollwyvl opened this issue Jan 3, 2023 · 2 comments
Open

Handling of failing addon entry_points #938

bollwyvl opened this issue Jan 3, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@bollwyvl
Copy link
Collaborator

bollwyvl commented Jan 3, 2023

References

Problem

from #934 (comment)

       try:
           addon_implementations[name] = entry_point.load()
       except Exception as err:  # pragma: no cover
           warnings.warn(f"[lite] [{name}] failed to load: {err}")

It could be convenient if this was an exception instead, I've seen cases where the xeus-python addon would fail to load and it would have been convenient for jupyter lite build to not continue building.

Proposed Solution

Some options:

  • check the strict mode (True by default) and fail on any entry_point.load()
    • maybe still try to .load() all of them, and collect and print all the errors together
      • getting all of the tracebacks is often useful, though, too
    • this is a breaking change, but not a huge one
  • ??? please add more :P

Additional context

...

@bollwyvl bollwyvl added the enhancement New feature or request label Jan 3, 2023
@martinRenou
Copy link
Member

Thanks for opening an issue tracking this!

this is a breaking change, but not a huge one

Is it?

@bollwyvl
Copy link
Collaborator Author

bollwyvl commented Jan 4, 2023

Replied at some point, but apparently it got lost.

I think anything that causes a hard fail where before there wasn't one is kinda breaking. But perhaps this is more of a bug, if the default of --strict=True was meant to fail fast. Either way, we should take a look at what e.g. nbconvert does, which also uses entry_points for extensibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants