Repository navigation
docs(adr): reword ADR-0007's contract to cover Litestar's application_config - #355
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #329.
ADR-0007 said every bootstrapper takes the user's application and returns the same object. Litestar never did: it takes
application_configand builds the app withLitestar.from_config. FastAPI, FastStream and FastMCP only do it when the user passes an app, and build a default one otherwise.Per the decision on #329, this rewords ADR-0007's first sentence to describe what the bootstrappers actually do instead of adding an exception ADR. A bootstrapper takes the user's application or builds one from config, instruments it, and returns it. The ADR now names Litestar's reason: its plugins and middleware have to be in the
AppConfigbefore the app exists. The Django argument still holds under the wider contract, becausesettings.pyruns before any object a bootstrapper could be handed or build.docs/integrations/litestar.mdgains a sentence after the first example explainingapplication_config, linking the ADR by absolute URL sincedocs/adr/is not published on the docs site.No code changes. Verified:
just adr-check,just docs-build(strict), and lychee in the CI job's offline mode pass.