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

Include reexported names in list of exported names #38809

Merged
merged 1 commit into from
Jun 15, 2020

Conversation

weswigham
Copy link
Member

Fixes #38530

Copy link
Contributor

@Kingwl Kingwl left a comment

Choose a reason for hiding this comment

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

I‘m not sure what happend... but LGTM...

@weswigham
Copy link
Member Author

Ping @rbuckton ❤️

@@ -339,37 +339,6 @@ namespace ts {
}
}

for (const externalImport of moduleInfo.externalImports) {
Copy link
Member

Choose a reason for hiding this comment

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

I didn't see any tests affected that use SystemJS, so I'm not sure what effect (if any) this change made. Is it handled by the change in utilities.ts, or are we missing test cases?

Copy link
Member Author

Choose a reason for hiding this comment

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

This removed code duplicated the reexports preservation for systemjs. In effect, for systemjs only, we were tracking reexports in a second list. So, rather than duplicating the systemjs code into all the other module systems, I removed code from the systemjs resolver and let it rely on the single list having the reexports in it (since every module mode needs them now).

Copy link
Member

@rbuckton rbuckton left a comment

Choose a reason for hiding this comment

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

Looks good, assuming we have adequate coverage for system modules, per my other comment.

@weswigham
Copy link
Member Author

@RyanCavanaugh should we backport this change to 3.9?

@weswigham weswigham merged commit 4bda7ce into microsoft:master Jun 15, 2020
@ValentinH
Copy link

Yes please 🙏😅

@rbuckton
Copy link
Member

@weswigham I think you may have missed a test baseline. PR builds are currently failing:

 1) 
       
         unittests:: tsbuild:: inferredTypeFromTransitiveModule::
           tsc --b /src --verbose inferredTypeFromTransitiveModule:: reports errors in files affected by change in signature with isolatedModules serializedEdits
             serializedBuild
               Generates files matching the baseline:
     Error: The baseline file tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js has changed.
      at writeComparison (src/harness/harnessIO.ts:1384:23)
      at Object.runBaseline (src/harness/harnessIO.ts:1394:13)
      at Context.<anonymous> (src/testRunner/unittests/tsc/helpers.ts:148:30)
      at processImmediate (internal/timers.js:456:21)

It looks like the diff is due to this change.

@weswigham
Copy link
Member Author

Semantic merge conflicts shakes fist

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.

Cannot redefine exports when exporting identifiers with the same name from different files
5 participants