Skip to content

Remove "legacy" Client config object types #1506

@pileks

Description

@pileks

Is your feature request related to a problem? Please describe.
With the latest changes to the ClientConfigBuilder and its new BuilderConfig object outlined in #1480, we are converging onto a unified system of configuration, which consists of:

  • BuilderConfig as the config object used by the ClientConfigBuilder internally
  • ClientConfigBuilder which can spit out a CoreClientConfig, and
  • CoreClientConfig, which is now used both within the PolywrapCoreClient and the PolywrapClient

With this convergence, we have 3 "vestigial" config objects which the PolywrapClient accepts and transforms into a CoreClientConfig using the ClientConfigBuilder:

  • PolywrapClientConfig
  • ClientConfig
  • PolywrapCoreClientConfig

Describe the solution you'd like
We could (and likely should) remove these 3 vestigial config types before 0.10 in order to facilitate a less confusing configuration experience. This would include removing everything from the legacy folder in packages/js/client, including the now public-facing generic types for Envs, etc.

My proposal is that PolywrapClient's constructor only accepts CoreClientConfig, which can be built using the ClientConfigBuilder.
I'm on the fence about whether we'd want PolywrapClient's constructor to accept a BuilderConfig object, as this seems to be the last place where there is a dependency between @polywrap/client-js and @polywrap/client-config-builder-js. Separating these two isn't a top priority, but it would be nice to have, as we could have each of them then be 100% focused on their own concerns.

Describe alternatives you've considered
We can keep this legacy folder alive for however long we'd like, but we're then nudging developers into 4 separate ways of setting up the PolywrapClient - not ideal IMO.

Additional context
/

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions