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

feature: Inform users when local option has no effect #214

Open
pawamoy opened this issue Dec 5, 2024 · 0 comments
Open

feature: Inform users when local option has no effect #214

pawamoy opened this issue Dec 5, 2024 · 0 comments
Assignees
Labels
error-handling Improvements to error handling feature New feature or request logging Related logging messages

Comments

@pawamoy
Copy link
Member

pawamoy commented Dec 5, 2024

Is your feature request related to a problem? Please describe.

Our architecture has some quirks subtleties. For example: each package will be loaded only once. But it can be first loaded anywhere (in any Markdown page). And certain packages might need some Griffe extensions enabled, while others don't. Therefore extensions must be configurable in local options. But sometimes users try to enable extensions for specific objects. That doesn't work if the package was already loaded without these extensions. Therefore the extensions config had no effect on the specific objects, leaving users confused as to why it has no effect.

Describe the solution you'd like

We should keep track of things and inform users when they used an option that had no effect, with an explanation and a suggestion on how to fix it.

For example:

  • record that package a was loaded with extensions config e1
  • each time an object from a is rendered, check if local extensions config is equal to e1, and if not, log a message

Describe alternatives you've considered

Change how the handler works to force-reload a package when needed, or maybe just overwrite the parts that were selected. The latter might prove difficult. The former might cause other issues (objects previously loaded without extensions now loaded with extensions).

Additional context

/

@pawamoy pawamoy added the feature New feature or request label Dec 5, 2024
@pawamoy pawamoy self-assigned this Dec 5, 2024
@pawamoy pawamoy added error-handling Improvements to error handling logging Related logging messages labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error-handling Improvements to error handling feature New feature or request logging Related logging messages
Projects
None yet
Development

No branches or pull requests

1 participant