Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dependency hell: hide foreign types from public interface #733

Open
webern opened this issue Dec 6, 2023 · 0 comments
Open

fix dependency hell: hide foreign types from public interface #733

webern opened this issue Dec 6, 2023 · 0 comments
Milestone

Comments

@webern
Copy link
Contributor

webern commented Dec 6, 2023

We have created a dependency hell where tough, pubsys, and testsys all need to update the aws-sdk libraries in lockstep. This is because we have exposed types from these libraries in our public interface. Here is one such example:

pub client: Option<KmsClient>,

We need to replace these types with types of our own that hide the underlying type. In other words, in the above example, instead of exposing a KmsClient as the input, we need to take a tough_kms::Client object that wraps and hides the foreign type.

We should scrub for additional exposed types and consider whether or not they should be hidden. Sometimes libraries are so stable on a major version that it is considered fine/idiomatic to expose them (Url for example), but as a general principle it is a very bad idea to leak someone else's types in a public interface.

Related: awslabs/coldsnap#301

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

No branches or pull requests

1 participant