-
Notifications
You must be signed in to change notification settings - Fork 63
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
Handle re-exported types #2
Merged
Merged
Conversation
This file contains 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
First step in fixing a problem is admitting you have one!
This allows more effective usage of dbg! to debug tests where the source generation command succeeded but other expectations are broken.
…an't render `std`).
Ensure that all generic type parameters are using fully-qualified paths, instead of checking just the base path.
LukeMathWalker
added a commit
that referenced
this pull request
Feb 14, 2023
* Remove hack to fix the import path of hyper::body::Body. First step in fixing a problem is admitting you have one! * Improve test output on failure - it should always include stdout/stderr. This allows more effective usage of dbg! to debug tests where the source generation command succeeded but other expectations are broken. * Make sure that the path index only contains paths that are publicly reachable. * Build a mechanism to find the publicly importable path for a type. * Update snapshots for one test. * Update snapshots for one test. * Fix flaky test. * Align example with current usage pattern. The example is broken (we can't render `std`). * Hack together a flow to resolve std's types. * Update rustdoc * Add utility CLI to quickly review snapshots. * Specify requirements. * Refactor. * Refactor. * Clarify * Do not use `syn` in the path-related types in `language`. Ensure that all generic type parameters are using fully-qualified paths, instead of checking just the base path. * Remove dead code that was commented out. Co-authored-by: Luca Palmieri <[email protected]>
LukeMathWalker
added a commit
that referenced
this pull request
Aug 14, 2023
The registered middlewares are now properly validation by `pavexc`: - they take `Next` as input (once) - they return a type that can be converted into a `Response` (either directly or in the happy case) - they don't use generic parameters that we can't reliably infer I did some refactorings along the way, especially in the component database (arguably the messiest part of the codebase).
LukeMathWalker
added a commit
that referenced
this pull request
Dec 22, 2023
LukeMathWalker
added a commit
that referenced
this pull request
Jan 17, 2024
Another piece of the version management story: the `pavex` CLI can now install a more recent version of itself. For completeness, we also provide an uninstall command that removes the binary as well as all the transient data that Pavex builds when compiling projects.
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.
This is a pretty massive changeset that snowballed from a deceptively simple problem: make sure that
pavex
can handlehyper::Body
.That requires us to handle public re-exports (i.e.
pub use hyper::body::Body
wherehyper::body
is a private module) which in turn forces us to handle types from the standard library.On the way I also took the opportunity to refactor
ResolvedPath
and make sure that we are resolving all generic parameters on top of the base type.When rust-lang/rust#102241 lands I should be able to remove the hard-coded path to
std
's docs.