Skip to content

Conversation

@nerfZael
Copy link
Contributor

@nerfZael nerfZael commented May 18, 2023

The goal of this PR is to bring the Rust Client resolution structure closer to its JS counterpart.

This includes:

  • Renaming the core resolvers module into resolution and moving the resolvers to the resolvers crate
  • Removing UriResolverLike (which doesn't work in Rust since it requires the enum to "know" about the different resolvers) and replacing it with type casting which is more Rust idiomatic
  • Implementing a resolver_vec macro to simplify building nested resolvers (it autocasts arrays of resolvers to the base UriResolver type)
  • Removal of UriResolverWithHistory base trait and impl since it doesn't really work if used with types outside of the core crate (due to Rust limitations), and while it does slightly simplify tracking resolution history for the user, it also masks that process and makes it more confusing

@nerfZael nerfZael marked this pull request as ready for review May 18, 2023 15:37
@nerfZael nerfZael requested review from cbrzn and namesty and removed request for cbrzn May 18, 2023 15:37
@namesty namesty merged commit 4d6b37d into nerfzael-core-client-refactor May 18, 2023
@cbrzn cbrzn deleted the nerfzael-resolution-refactor branch May 31, 2023 18:30
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.

3 participants