Skip to content

Conversation

weswigham
Copy link
Member

Fixes #32298

Technically this won't fix all possible augmentation-including scenarios, namely this will only capture augmentations of direct dependencies; augmentations provided by transitive dependencies are a whole other bag of problems. But I'm wondering if we actually need to preemptively fix that or not; in such scenarios we'd probably need to generate and add reference directives, which could be much more undesirable than the simple preservation of an existing import.

@sandersn
Copy link
Member

sandersn commented Apr 7, 2020

It would be nice to know how many projects have augmentations coming directly from dependencies vs transitive dependencies. But I can't think of an easy way to estimate that.

@weswigham
Copy link
Member Author

When it comes to preserving something already in the declaration file vs injecting something from the aether, I'm also just much more comfortable preserving the existing thing.

@sandersn
Copy link
Member

sandersn commented Apr 8, 2020

Agree!

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

I suggested one possible speedup, but I'm not sure it's valid.

@weswigham weswigham merged commit 141ee01 into microsoft:master Apr 13, 2020
@weswigham weswigham deleted the retain-imports-if-they-add-augmentations branch April 13, 2020 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merged declarations are not written to the parent
3 participants