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

Tsickle distribution package contains multiple amd-module declaratios. #846

Closed
mhevery opened this issue Jun 28, 2018 · 3 comments · Fixed by #847
Closed

Tsickle distribution package contains multiple amd-module declaratios. #846

mhevery opened this issue Jun 28, 2018 · 3 comments · Fixed by #847

Comments

@mhevery
Copy link

mhevery commented Jun 28, 2018

The v0.30.0 distribution of Tsickle is invalid. some files contain amd-module declarations more than once. Having multiple declarations of amd-module is invalid TypeScript file.

Example: node_modules/tsickle/src/googmodule.d.ts

/// <amd-module name="tsickle/src/googmodule" />
/**
 * @license
 * Copyright Google Inc. All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */
/// <amd-module name="tsickle/src/googmodule" />
import {ModulesManifest} from './modules_manifest';
import * as ts from './typescript';

Here is a full list of offending files:

node_modules/tsickle/src/googmodule.d.ts:9:1 - error TS2458: An AMD module cannot have multiple name assignments.

9 /// <amd-module name="tsickle/src/googmodule" />
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


node_modules/tsickle/src/modules_manifest.d.ts:9:1 - error TS2458: An AMD module cannot have multiple name assignments.

9 /// <amd-module name="tsickle/src/modules_manifest" />
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


node_modules/tsickle/src/source_map_utils.d.ts:9:1 - error TS2458: An AMD module cannot have multiple name assignments.

9 /// <amd-module name="tsickle/src/source_map_utils" />
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


node_modules/tsickle/src/tsickle.d.ts:9:1 - error TS2458: An AMD module cannot have multiple name assignments.

9 /// <amd-module name="tsickle/src/tsickle" />
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


node_modules/tsickle/src/typescript.d.ts:9:1 - error TS2458: An AMD module cannot have multiple name assignments.

9 /// <amd-module name="tsickle/src/typescript" />
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@evmar
Copy link
Contributor

evmar commented Jun 28, 2018

Amusingly, we don't write this comment, so it might be a bug in how TypeScript generates its d.ts files (?)

@rkirov
Copy link
Contributor

rkirov commented Jun 28, 2018

@evmar
Copy link
Contributor

evmar commented Jun 28, 2018

Nice find! It looks like the bug it was working around was fixed in TS 2.9, so that's why it double-emits.

rkirov added a commit that referenced this issue Jun 28, 2018
This is to fix #846, since we don't have push rights to
rules_typescript, for now just point to a custom fork for the repo.
rkirov added a commit that referenced this issue Jun 28, 2018
This is to fix #846, since we don't have push rights to
rules_typescript, for now just point to a custom fork for the repo.
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

Successfully merging a pull request may close this issue.

3 participants