Skip to content

Improve stack-related compiler error messages#337

Merged
olix0r merged 9 commits intomasterfrom
ver/stack-invesion-prime
Sep 3, 2019
Merged

Improve stack-related compiler error messages#337
olix0r merged 9 commits intomasterfrom
ver/stack-invesion-prime

Conversation

@olix0r
Copy link
Member

@olix0r olix0r commented Sep 3, 2019

Service stacks were built from "top" to bottom, so that the concrete
service type is satisfied after all middlewares are composed together.
This leads to exceedingly complex compiler error messages.

This change adds a svc::Stack builder that aids composing layers
around a concrete inner service so that the compiler can more clearly
identity the layer that violates the type contract.

Note: this does not appear to improve compile times.

No functional changes are intended.

olix0r added 8 commits August 31, 2019 21:53
The builder type should only be used when composing layers. Now that we
have `Builder::into_inner`, we need not store a builder in the profile
router.
Service stacks were built from "top" to bottom, so that the concrete
service type is satisied after all middlewares are composed toegether.
This leads to exceedingly complex compiler error messages.

This change adds a `svc::Stack` builder that aids composing layers
around a concrete inner service so that the compiler can more clearly
identity the layer that violates the type contract.

Note: this does *not* appear to improve compile times.

No functional changes are intended.
@olix0r olix0r self-assigned this Sep 3, 2019
@olix0r olix0r requested review from hawkw and kleimkuhler September 3, 2019 21:40
@olix0r
Copy link
Member Author

olix0r commented Sep 3, 2019

Resumission of #331, but against master instead of a development branch

@olix0r olix0r merged commit 108e95b into master Sep 3, 2019
@olix0r olix0r deleted the ver/stack-invesion-prime branch September 3, 2019 23:06
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Sep 5, 2019
* Stop using a Builder in the profile router (linkerd/linkerd2-proxy#330)
* Update and rename .github/workflows/rust.yml to rust.yml
* Fix compile error on windows (linkerd/linkerd2-proxy#335)
* Revert "Update and rename .github/workflows/rust.yml to rust.yml"
* travis: Allow 60 minutes for integration tests (linkerd/linkerd2-proxy#336)
* tests: Properly simulate destination errors (linkerd/linkerd2-proxy#332)
* Improve stack-related compiler error messages (linkerd/linkerd2-proxy#337)
* update hyper to v0.12.34
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Sep 5, 2019
* Stop using a Builder in the profile router (linkerd/linkerd2-proxy#330)
* Update and rename .github/workflows/rust.yml to rust.yml
* Fix compile error on windows (linkerd/linkerd2-proxy#335)
* Revert "Update and rename .github/workflows/rust.yml to rust.yml"
* travis: Allow 60 minutes for integration tests (linkerd/linkerd2-proxy#336)
* tests: Properly simulate destination errors (linkerd/linkerd2-proxy#332)
* Improve stack-related compiler error messages (linkerd/linkerd2-proxy#337)
* update hyper to v0.12.34
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.

2 participants