Skip to content

Conversation

rbuckton
Copy link
Contributor

@rbuckton rbuckton commented Apr 8, 2016

This moves a lot of the getOriginalNode checks to the emit resolver to simplify the transformers.
This also fixes namespace qualification issues for module declarations (#7868).

Fixes the following failing tests:

  • tests/cases/conformance/externalModules/duplicateExportAssignments.ts
  • tests/cases/compiler/cloduleWithRecursiveReference.ts
  • tests/cases/compiler/collisionCodeGenModuleWithMemberVariable.ts
  • tests/cases/compiler/collisionCodeGenModuleWithModuleReopening.ts
  • tests/cases/compiler/importAndVariableDeclarationConflict1.ts
  • tests/cases/compiler/importAndVariableDeclarationConflict2.ts
  • tests/cases/compiler/importAndVariableDeclarationConflict3.ts
  • tests/cases/compiler/importAndVariableDeclarationConflict4.ts
  • tests/cases/compiler/mergedModuleDeclarationCodeGen5.ts
  • tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt2.ts
  • tests/cases/compiler/recursiveCloduleReference.ts
  • tests/cases/compiler/superInObjectLiterals_ES5.ts

@rbuckton rbuckton added the Domain: Transforms Relates to the public transform API label Apr 8, 2016
if (fs.existsSync(localBaseline)) {
jake.rmRf(localBaseline);
}
if (!environmentVariableIsDisabled("CLEAN_TESTS")) {
Copy link
Member

Choose a reason for hiding this comment

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

instead of checking an environment variable to skip cleaning, a separate task called "runtest-dirty" or "runtest-noclean" would be safer. At least if somebody does $env:CLEAN_TESTS = "no" and forgets, they'll get very confusing baseline-accept runs later.

case SyntaxKind.ExportDeclaration:
const exportClause = (<ExportDeclaration>node).exportClause;
return exportClause && forEach(exportClause.elements, isValueAliasDeclaration);
case SyntaxKind.ExportAssignment:
return (<ExportAssignment>node).expression && (<ExportAssignment>node).expression.kind === SyntaxKind.Identifier ? isAliasResolvedToValue(getSymbolOfNode(node)) : true;
Copy link
Member

Choose a reason for hiding this comment

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

this line is way too long to read on github

@sandersn
Copy link
Member

👍 for this change, although cloneEntityName's documentation seems suspicious so it might need some unrelated changes.

@rbuckton
Copy link
Contributor Author

I can modify emitter to no longer use cloneEntityName in the same fashion as I am now doing in the transformer and remove cloneEntityName as its no longer needed.

@sandersn
Copy link
Member

👍

@rbuckton rbuckton merged commit f1ec827 into transforms Apr 13, 2016
@rbuckton rbuckton deleted the transforms-fix7868 branch April 13, 2016 17:54
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Domain: Transforms Relates to the public transform API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants