Skip to content

Conversation

oguzkocer
Copy link
Contributor

This PR wraps up the immediate work related to #[derive(WpDerivedRequest)] and includes miscellaneous changes:

  • Removes the 2 suffix from request builder types we temporarily used during the transition.
  • Simplifies the RequestBuilder type to remove request execution and renames it as InnerRequestBuilder to make it easier to separate from the generated types such as UsersRequestBuilder.
  • Cleans up the config type used in WpDerivedRequest to make it easier to work with.
  • The request executor will now build its own request builder. Prior to this change, we had to build a UsersRequestBuilder to pass it into UsersRequestExecutor's constructor, but now we pass the arguments required to build UsersRequestBuilder instead.
  • The generated request builder & executor now accepts a WpAuthentication instead of InnerRequestBuilder and builds the inner type itself. This comes at a tiny additional memory cost, however it improves the function signature and some of the extra restrictions.
  • Makes generated request builder & executor available to pub

@oguzkocer oguzkocer added the Rust label Jun 21, 2024
@oguzkocer oguzkocer added this to the 0.1 milestone Jun 21, 2024
@oguzkocer oguzkocer requested a review from jkmassel June 21, 2024 16:47
@oguzkocer oguzkocer force-pushed the plugins-from-derived-request branch from d4c573f to 151d71b Compare June 25, 2024 19:08
@jkmassel jkmassel force-pushed the plugins-from-derived-request branch from 151d71b to 34390b6 Compare June 25, 2024 19:10
Copy link
Contributor

@jkmassel jkmassel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed in sync call – this is mostly just cleanup and renaming things (and removing some code)

@jkmassel jkmassel force-pushed the plugins-from-derived-request branch from 34390b6 to 415dee9 Compare June 25, 2024 19:25
Base automatically changed from plugins-from-derived-request to trunk June 25, 2024 19:46
@oguzkocer oguzkocer force-pushed the wp_derived_request_integration_cleanup branch from bb81144 to 5ab163f Compare June 25, 2024 20:04
@oguzkocer oguzkocer enabled auto-merge (squash) June 25, 2024 20:09
@oguzkocer oguzkocer merged commit 201fe98 into trunk Jun 25, 2024
@oguzkocer oguzkocer deleted the wp_derived_request_integration_cleanup branch June 25, 2024 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants