Commit Graph

114 Commits

Author SHA1 Message Date
Russell Cohen 71c5788398
Default collections RFC (#2900)
[Rendered](https://github.com/awslabs/smithy-rs/blob/flatten-collections-rfc/design/src/rfcs/rfc0035_collection_defaults.md)

Could use a bit more color but I think it gets the point across.

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2023-08-03 17:39:33 +00:00
John DiSanti 666c474f4a
Tidy up `aws-smithy-runtime-api` a bit (#2867)
This PR makes some progress towards documenting the
`aws-smithy-runtime-api` crate, as well as some additional work to make
it more stable:

- Places the `client` module behind a `client` feature so that it will
be possible to add a `server` module/feature in the future.
- Deletes `ConfigBagAccessors`.
- Renames auth types to reflect changes in the internal spec.
- Moves `RequestAttempts` into the `client::retries` module.
- Moves several types that were in floating around in
`client::orchestrator` to their own modules.
- Renames `Connector` to `HttpConnector`.
- Changes `DynResponseDeserializer` to `SharedResponseDeserializer` for
consistency with serialization, and also so that it could be moved into
runtime components or config in the future (since those need to
implement `Clone`).
- Updates the identity and auth design doc.
- Updates READMEs and crate-level documentation.
- Fixes most, but not all, the missing documentation in the crate.
- Hides the builder macros.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-07-24 15:28:49 +00:00
david-perez ddba46086a
Better distinguish model and HTTP plugins (#2827)
So far, servers have tacitly worked with the notion that plugins come in
two flavors: "HTTP plugins" and "model plugins":

- A HTTP plugin acts on the HTTP request before it is deserialized, and
  acts on the HTTP response after it is serialized.
- A model plugin acts on the modeled operation input after it is
  deserialized, and acts on the modeled operation output or the modeled
  operation error before it is serialized.

However, this notion was never reified in the type system. Thus, users
who pass in a model plugin where a HTTP plugin is expected or
viceversa in several APIs:

```rust
let pipeline = PluginPipeline::new().push(http_plugin).push(model_plugin);

let app = SimpleService::builder_with_plugins(http_plugins, IdentityPlugin)
    .post_operation(handler)
    /* ... */
    .build()
    .unwrap();
```

would get the typical Tower service compilation errors, which can get
very confusing:

```
error[E0631]: type mismatch in function arguments
  --> simple/rust-server-codegen/src/main.rs:47:6
   |
15 | fn new_svc<S, Ext>(inner: S) -> model_plugin::PostOperationService<S, Ext> {
   | -------------------------------------------------------------------------- found signature defined here
...
47 |     .post_operation(post_operation)
   |      ^^^^^^^^^^^^^^ expected due to this
   |
   = note: expected function signature `fn(Upgrade<RestJson1, (PostOperationInput, _), PostOperationService<aws_smithy_http_server::operation::IntoService<simple::operation_shape::PostOperation, _>, _>>) -> _`
              found function signature `fn(aws_smithy_http_server::operation::IntoService<simple::operation_shape::PostOperation, _>) -> _`
   = note: required for `LayerFn<fn(aws_smithy_http_server::operation::IntoService<..., ...>) -> ... {new_svc::<..., ...>}>` to implement `Layer<Upgrade<RestJson1, (PostOperationInput, _), PostOperationService<aws_smithy_http_server::operation::IntoService<simple::operation_shape::PostOperation, _>, _>>>`
   = note: the full type name has been written to '/local/home/davidpz/workplace/smithy-ws/src/SmithyRsSource/target/debug/deps/simple-6577f9f79749ceb9.long-type-4938700695428041031.txt'
```

This commit introduces the `HttpPlugin` and `ModelPlugin` marker traits,
allowing plugins to be marked as an HTTP plugin, a model plugin, or
both. It also removes the primary way of concatenating plugins,
`PluginPipeline`, in favor of `HttpPlugins` and `ModelPlugins`, which
eagerly check that whenever a plugin is `push`ed, it is of the expected
type. The generated service type in the server SDKs'
`builder_with_plugins` constructor now takes an `HttpPlugin` as its
first parameter, and a `ModelPlugin` as its second parameter.

I think this change perhaps goes counter to the generally accepted
wisdom that trait bounds in Rust should be enforced "at the latest
possible moment", that is, only when the behavior encoded in the trait
implementation is relied upon in the code (citation needed).
However, the result is that exposing the concepts of HTTP plugin and
model plugin in the type system makes for code that is easier to reason
about, and produces more helpful compiler error messages.

Documentation about the plugin system has been expanded, particularly on
how to implement model plugins.

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-07-04 12:19:15 +00:00
Harry Barber 934129cf4c
Consolidate `proto` and `protocols` modules into single `protocol` module (#2780)
## Motivation and Context

We have two modules `proto` and `protocols` in `aws_smithy_http_server`,
these can be consolidated.
2023-06-20 12:27:25 +00:00
Harry Barber b2bdcba57a
Parameterize `Plugin` by service rather than protocol (#2772)
## Motivation and Context

Closes https://github.com/awslabs/smithy-rs/issues/1839

Currently, `Plugin` is parameterized by protocol and operation. To
improve symmetry, extensibility and uniformity we switch this to be
parameterized by service instead. The protocol can still be recovered
via the `type Protocol` associated type on `ServiceShape`.

## Description

- Add `ServiceShape` trait, encoding the properties of a Smithy service.
- Change `Plugin<Protocol, Operation, S>` to `Plugin<Service, Operation,
S>`.
- Add `FilterByOperation` and `filter_by_operation` `Plugin`s.
2023-06-15 21:37:24 +00:00
Harry Barber 988eb617fb
Add `Scoped` `Plugin` (#2759)
## Motivation and Context

The
[`FilterByOperationName`](https://docs.rs/aws-smithy-http-server/0.55.4/aws_smithy_http_server/plugin/struct.FilterByOperationName.html)
allows the customer to filter application of a plugin. However this is a
_runtime_ filter. A faster and type safe alternative would be a nice
option.

## Description

Add `Scoped` `Plugin` and `scope` macro.

---------

Co-authored-by: david-perez <d@vidp.dev>
2023-06-14 14:17:35 +00:00
Harry Barber 11cf41d944
Simplify `Plugin` trait (#2740)
## Motivation and Context

https://github.com/awslabs/smithy-rs/issues/2444

## Description

- Simplify `Plugin`, make it closer to `Layer`.
- Remove `Operation`.
2023-06-12 16:46:58 +00:00
Russell Cohen dabbfaa8e3
Add the ability to disable interceptors via the config bag (#2757)
This replaces the existing custom interceptor disable logic with shared
logic to allow generally disabling any public interceptors from Runtime
plugins. The previous behavior was very brittle because it relied
heavily on runtime plugin execution order.

## Motivation and Context
- simplify presigning behavior
- generalize logic to disable interceptors

## Description
Create `disable_interceptor` struct, which, when inserted into the
configuration bag can disable an interceptor via the `Interceptors`
execution interface.

## Testing
- ` (cd aws/sdk/build/aws-sdk/sdk/s3 && cargo test --test presigning)`

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-06-08 17:31:52 +00:00
Harry Barber 29a900e74d
Add CI to the book (#2027)
## Motivation and Context

Closes https://github.com/awslabs/smithy-rs/issues/2004

## Description

Run `mdbook test` over the `design` folder.

## TODO

- [x] Ignore the RFC sections using `ignore` tag on the code blocks.
- [ ] Fix the remaining examples.
- [x] Ensure local `rust-runtime` dependencies are being used.

---------

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Co-authored-by: 82marbag <69267416+82marbag@users.noreply.github.com>
2023-06-07 09:01:16 +00:00
82marbag d083c6f271
remove native-tls (#2675)
* Show how to plug a connector
* For TLS: keep rustls, only

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2023-05-26 10:18:29 +00:00
John DiSanti 2e6b6345ee
Add an identity and auth design doc (#2559)
## Motivation and Context
This PR adds a design doc for client identity and auth for the new
client orchestrator.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2023-04-19 17:47:49 +00:00
Zelda Hessler ab6f607f0b
add: orchestrator design doc (#2543)
This document is intended to capture the philosophy and ideas
underpinning the current state of the orchestrator and should grow
alongside the orchestrator.

Abhinav requested something like this and I think it'll be helpful for
future people.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2023-04-19 16:48:50 +00:00
Harry Barber a737694f73
Move examples to root, refactor to workspace, and refactor integration tests (#2481)
* Move examples

* Update documentation

* Add to CI

* Fix CI

* Cleanup

* Fix clippy lints

* Fix documentation

* Bump example dependencies

* Cleanup

* Update documentation

---------

Co-authored-by: Matteo Bigoi <1781140+crisidev@users.noreply.github.com>
2023-03-22 14:00:21 +00:00
Russell Cohen de97b3d7f3
Remove deprecated ResolveAwsEndpoint and related interfaces. (#2464)
* Remove deprecated ResolveAwsEndpoint and related interfaces.

* update changelog with pointer

* Rename AwsEndpointDecorator to have a more appropriate name

* Allow endpoint resolver to be omitted
2023-03-21 12:43:04 +00:00
Zelda Hessler a02426fc46
RFC: Smithy Orchestrator (#2439)
* add: WIP for smithy orchestrator RFC

* update: incorporate runtime plugin ideas

* update: RFC to reflect current impl of orchestrator
add: section on encapsulation

* update: RFC code examples

* update: changes section:
update: FAQ
update: set status to "implemented"

* fix: code example indentation

* no really, fix the indents

* I keep seeing more...

* Thanks Yuki
2023-03-17 16:02:16 +00:00
John DiSanti b2c5eaa328
Update RFC-26 (#2453) 2023-03-14 14:27:39 +00:00
Harry Barber bec93c8a5e
Remove uncessary type parameter and constraints from `Upgrade` service (#2436)
* Remove B from Upgrade service

* Remove duplicated bounds on Upgradable

* Update documentation

* Add CHANGELOG.next.toml entry
2023-03-08 15:56:56 +00:00
Julian Antonielli 72df8440c0
Correct outdated details (#2420) 2023-02-28 07:47:21 +00:00
Harry Barber d7f81308bf
Update the service builder RFCs (#2374)
* Complete service_builder.md

* Complete refine_builder.md
2023-02-15 11:45:56 +00:00
John DiSanti 13b10d51a8
Add RFC for improving request ID access in SDK clients (#2083) 2023-02-10 19:07:56 +00:00
david-perez 3ee62e8a4c
RFC: Better Constraint Violations (#2040) 2023-02-07 12:51:35 +00:00
Thomas Cameron efd1508eec
Update the event stream section in RFC30 (#2243) 2023-01-27 22:30:34 +00:00
ysaito1001 c21705852c
Add RFC: Providing fallback credentials on timeout (#2218)
* Add RFC: providing fallback credentials on timeout

* Update design/src/rfcs/rfc0031_providing_fallback_credentials_on_timeout.md

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* Update design/src/rfcs/rfc0031_providing_fallback_credentials_on_timeout.md

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* Update design/src/rfcs/rfc0031_providing_fallback_credentials_on_timeout.md

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* Update design/src/rfcs/rfc0031_providing_fallback_credentials_on_timeout.md

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* Update design/src/rfcs/rfc0031_providing_fallback_credentials_on_timeout.md

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* Update design/src/rfcs/rfc0031_providing_fallback_credentials_on_timeout.md

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* Update design/src/rfcs/rfc0031_providing_fallback_credentials_on_timeout.md

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* Update design/src/rfcs/rfc0031_providing_fallback_credentials_on_timeout.md

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* Update design/src/rfcs/rfc0031_providing_fallback_credentials_on_timeout.md

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* Update design/src/rfcs/rfc0031_providing_fallback_credentials_on_timeout.md

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* Update design/src/rfcs/rfc0031_providing_fallback_credentials_on_timeout.md

Co-authored-by: John DiSanti <jdisanti@amazon.com>

* Incorporate review feedback into RFC

This commit addresses the review feedback:
https://github.com/awslabs/smithy-rs/pull/2218#discussion_r1072657848
https://github.com/awslabs/smithy-rs/pull/2218#discussion_r1072685567
https://github.com/awslabs/smithy-rs/pull/2218#discussion_r1072693150

In addition, we have renamed the proposed method `on_timeout` to
`fallback_on_interrupt` to make it more descriptive.

* Update rfc0031_providing_fallback_credentials_on_timeout.md

* Update RFC

This commit updates RFC and leaves to discussion how `fallback_on_interrupt`
should be implemented, i.e., either as a synchronous primitive or an
asynchronous primitive.

* Update rfc0031_providing_fallback_credentials_on_timeout.md

* Update rfc0031_providing_fallback_credentials_on_timeout.md

* Update rfc0031_providing_fallback_credentials_on_timeout.md

---------

Co-authored-by: Yuki Saito <awsaito@amazon.com>
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>
2023-01-27 17:02:08 +00:00
Thomas Cameron 4af30b686c
UPDATE for RFC30: Serialization and deserialization (#2186)
* commit RFC

* commit

* Delete rfc0023_serialization_and_deserialization.md

* fix formatting

* https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054637168

* https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054632202

* applied grammarly
pre-commit

* better example wip

* FIX

* https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054632468

https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054818444

https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054820192

* add examples for output's builer

* fixes

* fixing unstable feature gate snippet

* Update rfc0028_serialization_and_deserialization.md

Section is deleted in response to the discussion
https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1061577656

* file name fix

* Update rfc0030_serialization_and_deserialization.md

https://github.com/awslabs/smithy-rs/pull/2183#discussion_r1064573442

* Update rfc0030_serialization_and_deserialization.md
2023-01-09 09:59:36 -06:00
Thomas Cameron 59f7e95047
RFC: Serialization and deserialization (#1944)
* commit RFC

* commit

* Delete rfc0023_serialization_and_deserialization.md

* fix formatting

* https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054637168

* https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054632202

* applied grammarly
pre-commit

* better example wip

* FIX

* https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054632468

https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054818444

https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054820192

* add examples for output's builer

* fixes

* fixing unstable feature gate snippet

* Update rfc0028_serialization_and_deserialization.md

Section is deleted in response to the discussion
https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1061577656

* file name fix
2023-01-04 16:33:58 +00:00
82marbag 87e45f6016
Request IDs (#2054)
* Request IDs

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-12-22 17:31:05 +00:00
ysaito1001 6211a91430
Add RFC for finding new home for credential types (#2082)
* Add RFC: new home for cred cache and builder api consistency

* Update design/src/rfcs/rfc0027_new_home_for_cred_cache_and_builder_api_consistency.md

Co-authored-by: John DiSanti <jdisanti@amazon.com>

* Update design/src/rfcs/rfc0027_new_home_for_cred_cache_and_builder_api_consistency.md

Co-authored-by: John DiSanti <jdisanti@amazon.com>

* Update rfc0027_new_home_for_cred_cache_and_builder_api_consistency.md

* Update rfc0027_new_home_for_cred_cache_and_builder_api_consistency.md

* Update rfc0027_new_home_for_cred_cache_and_builder_api_consistency.md

* Update design/src/SUMMARY.md

Co-authored-by: John DiSanti <jdisanti@amazon.com>

* Update design/src/rfcs/rfc0027_new_home_for_cred_cache_and_builder_api_consistency.md

Co-authored-by: John DiSanti <jdisanti@amazon.com>

* Update design/src/rfcs/overview.md

Co-authored-by: John DiSanti <jdisanti@amazon.com>

* Update the filename of RFC

* Update rfc0029_new_home_for_cred_types.md

* Update status of RFC 28

This commit addresses https://github.com/awslabs/smithy-rs/pull/2082#discussion_r1054922093.

Co-authored-by: Yuki Saito <awsaito@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-12-22 04:16:21 +00:00
John DiSanti d8fb08c90f
Fix RFC file names (#2128) 2022-12-22 03:20:49 +00:00
John DiSanti 839e3ce402
Add RFC for improving SDK credential caching through type safety (#1842) 2022-12-21 22:44:29 +00:00
Russell Cohen 2e3fa573d9
Add initial RFC document (endpoints 2.0) (#1637)
* Add initial RFC document

* CR feedback

* RFC updates

* Rename doc, add to summary / overview

* Apply suggestions from code review

Co-authored-by: John DiSanti <jdisanti@amazon.com>

* Update design/src/rfcs/rfc_0020_endpoints_20.md

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* RFC updates

* More cleanups

* Delete old file

* rfc updates

* delete old file

* fix merge

Co-authored-by: John DiSanti <jdisanti@amazon.com>
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-12-21 16:03:33 +00:00
Chase Coalwell ac0d99137c
Fix codegen doc link (#2120) 2022-12-21 00:14:09 +00:00
John DiSanti 381467d2ef
Add RFC for client crate organization (#1936)
Co-authored-by: Russell Cohen <rcoh@amazon.com>
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-12-08 20:12:37 +00:00
Russell Cohen 6beec943ab
Endpoints 2.0 Integration pre-work (#2063)
* Split endpoint resolution middleware into two parts & refactor endpoint generation

* Endpoints 2.0 Integration pre-work

This PR does a 3 bits of pre-work ahead of ep2 integration:
1. Split endpoint resolution into two separate middlewares:
  1. A smithy native middleware that applies URI and headers
  2. An AWS middleware that applies the auth schemes
2. Add vendorParams support to the ProtocolTestGenerator so that protocol tests can insert a region.
3. Simplify endpoint resolution logic by allowing `make_operation` to fail when an endpoint cannot be resolved.

* Back out previous change to insert endpoint directly into the bag

* backout changes to property bag

* Update changelog & add more docs

* Fix AWS test

* Fix test
2022-12-07 13:24:34 -05:00
Harry Barber d02ddea9d3
Fix server book documentation links (#2059) 2022-12-05 17:38:47 +00:00
Harry Barber 17cb98c975
Unhide new service builder and deprecate the prior (#1886)
Co-authored-by: david-perez <d@vidp.dev>
2022-12-02 18:31:00 +00:00
Harry Barber 5073a25bdb
Various small corrections to server documentation (#2050)
* Link to super from Handler and OperationService

* Note that structure documentation is from model

* Don't refer to ZSTs in operation_shape.rs opener

* Re-export everything from service to root

* Add reference to root documentation on service

* Fix spelling of MissingOperationsError

* #[doc(hidden)] for opaque_future

* Rename from-parts.md to from_parts.md

* Fix Connected link

* Use S type parameter and service as variable name

* Remove MissingOperation dead code

* Remove Operation header from operation.rs

* Remove reference to closures

* Document ConnectInfo<T> .0

* Add BoxBody documentation

* Rephrase operation.rs documentation

* Reference PluginPipeline from PluginStack

* Move the BoxBody documentation

* Document Plugin associated types

* Add example implementation for Plugin

* Link to plugin module from Plugin

* Improve FromParts/FromRequest documentation

* Remove links to doc(hidden) RuntimeError

* Add link from Upgradable to operation module
2022-12-02 13:56:35 +00:00
david-perez 7c86ecfc36
Add server SDK constraint traits RFC (#1199) 2022-12-01 16:07:23 +00:00
82marbag 9ae16e7949
RFC: RequestId for services (#1942)
* RFC 24 RequestId

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-11-30 14:20:53 +00:00
Luca Palmieri 044ebeac6f
Implement RFC 23, Part 2 - Plugin pipeline (#1971)
* Implement RFC 23, with the exception of PluginBuilder

* Update documentation.

* Avoid star re-exports.

* Elide implementation details in `Upgradable`.

* Update wording in docs to avoid personal pronouns.

* Update `Upgradable`'s documentation.

* Template the service builder name.

* Template MissingOperationsError directly.

* Code-generate an array directly.

* Sketch out the implementation of `PluginPipeline`.
Remove `PluginExt`.
Add a public constructor for `FilterByOperationName`.

* Ask for a `PluginPipeline` as input for the generated builder.

* Rename `add` to `push`.

* Remove Pluggable.
Rename `composer` module to `pipeline`.

* Remove all mentions of `Pluggable` from docs and examples.

* Fix punctuation.

* Rename variable from `composer` to `pipeline` in doc examples.

* Add a free-standing function for filtering.

* Rename.

* Rename.

* Update design/src/server/anatomy.md

Co-authored-by: david-perez <d@vidp.dev>

* Use `rust` where we do not need templating.

* Remove unused variable.

* Add `expect` message to point users at our issue board in case a panic slips through.

* Typo.

* Update `expect` error message.

* Refactor the `for` loop in ``requestSpecMap` into an `associateWith` call.

* Remove unnecessary bound - since `new` is private, the condition is already enforced via `filter_by_operation_name`.

* Use `Self` in `new`.

* Rename `inner` to `into_inner`

* Rename `concat` to `append` to correctly mirror Vec's API terminology.

* Fix codegen to use renamed method.

* Cut down the public API surface to key methods for a sequence-like interface.

* Add a note about ordering.

* Add method docs.

* Add Default implementation.

* Fix new pokemon bin example.

* Fix new pokemon bin example.

* Fix code-generated builder.

* Fix unresolved symbolProvider.

* Assign the `expect` error message to a variable.

* Do not require a PluginPipeline as input to `builder_with_plugins`.

* Reverse plugin application order.

* Upgrade documentation.

* Add a test to verify that plugin layers are executed in registration order.

* Add license header.

* Update middleware.md

* Typo.

* Fix more builder() calls.

Co-authored-by: david-perez <d@vidp.dev>
2022-11-16 18:10:51 +00:00
Luca Palmieri f13bb260a7
Implement RFC23 - Evolve the new service builder API (#1954)
* Implement RFC 23, with the exception of PluginBuilder

* Update documentation.

* Elide implementation details in `Upgradable`.

* Update wording in docs to avoid personal pronouns.

* Update `Upgradable`'s documentation.

* Template the service builder name.

* Template MissingOperationsError directly.

* Code-generate an array directly.

* Update design/src/server/anatomy.md

Co-authored-by: david-perez <d@vidp.dev>

* Use `rust` where we do not need templating.

* Remove unused variable.

* Add `expect` message to point users at our issue board in case a panic slips through.

* Typo.

* Update `expect` error message.

* Refactor the `for` loop in ``requestSpecMap` into an `associateWith` call.

* Fix new pokemon bin example.

* Fix new pokemon bin example.

* Fix unresolved symbolProvider.

* Assign the `expect` error message to a variable.

* Omit additional generic parameters in Upgradable when it's first introduced.

Co-authored-by: david-perez <d@vidp.dev>
2022-11-16 12:32:43 +00:00
John DiSanti 547dd4d608
Update errors RFC (#1977) 2022-11-11 09:35:04 -06:00
Luca Palmieri fa03f20bb9
Rename rfc0022_refine_builder.md to rfc0023_refine_builder.md (#1946)
* Rename rfc0022_refine_builder.md to rfc0023_refine_builder.md

* Add RFC23 to indexes
2022-11-04 11:06:24 +00:00
82marbag 49eb921b8d
Update RFC template (#1943) 2022-11-04 01:21:54 +00:00
Luca Palmieri 11e9a5f2c5
[RFC - Server] Refining the service builder API (#1859)
* RFC draft.

* Fix checkbox.

* Briefly describe the strategy in the `Overview` section.

* Add setter snippet

* Dive deeper into alternative mechanisms for scoping plugins.

* Add more changes.

* Fix snippet.

* Elaborate on type erasure.

* Remove dangling footnote.

* Fix common type.

* Add more caveats.

* Update the first approach for lazy type erasure
2022-11-03 17:18:23 +00:00
Harry Barber a026f6f6d6
Add FromParts documentation (#1930) 2022-11-01 18:04:39 +00:00
John DiSanti c35f0f1c7f
Add `#[non_exhaustive]` to example actionable error in RFC (#1883) 2022-10-26 22:28:43 +00:00
Harry Barber c18b1a0ab7
Add middleware documentation (#1844)
* Tweak plugin.rs documentation

* Add middleware.md
2022-10-25 12:21:20 +00:00
Harry Barber 55d16b1131
Make protocol ZSTs match shape ID names (#1858) 2022-10-17 14:00:43 +00:00
John DiSanti 7866477fd4
Add RFC for Error Context and Compatibility (#1819)
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-10-12 17:53:28 +00:00
Harry Barber 03ad6e7e52
Fix broken module path in instrumentation documentation (#1843) 2022-10-12 12:16:13 +01:00