Skip to content

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

@webern

Description

@webern

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:

https://github.com/awslabs/coldsnap/blob/d2615ece51be73966b82ebc4469516f1fd53cf4f/src/download.rs#L48C20-L48C38

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 taking an EbsClient as the input, we need to take a coldsnap::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/tough#733

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions