{"action":"opened","issue":{"url":"https://api.github.com/repos/angular/tsickle/issues/636","repository_url":"https://api.github.com/repos/angular/tsickle","labels_url":"https://api.github.com/repos/angular/tsickle/issues/636/labels{/name}","comments_url":"https://api.github.com/repos/angular/tsickle/issues/636/comments","events_url":"https://api.github.com/repos/angular/tsickle/issues/636/events","html_url":"https://github.com/angular/tsickle/issues/636","id":269199316,"number":636,"title":"No closure comments emitted at certain import constellations.","user":{"login":"martin19","id":4746984,"avatar_url":"https://avatars1.githubusercontent.com/u/4746984?v=4","gravatar_id":"","url":"https://api.github.com/users/martin19","html_url":"https://github.com/martin19","followers_url":"https://api.github.com/users/martin19/followers","following_url":"https://api.github.com/users/martin19/following{/other_user}","gists_url":"https://api.github.com/users/martin19/gists{/gist_id}","starred_url":"https://api.github.com/users/martin19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin19/subscriptions","organizations_url":"https://api.github.com/users/martin19/orgs","repos_url":"https://api.github.com/users/martin19/repos","events_url":"https://api.github.com/users/martin19/events{/privacy}","received_events_url":"https://api.github.com/users/martin19/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-27T18:42:12Z","updated_at":"2017-10-27T18:42:12Z","closed_at":null,"author_association":"NONE","body":"I've been struggling getting tsickle to work on my (non-angular) project. I think I have found a bug that is worth reporting here. My project did not contain any closure comments despite tsickle terminating without errors, so I've reduced it to this test case. \r\n\r\nI'm on windows10, \r\n\r\nworking constellation (closure comments correctly emitted)\r\n--\r\n\r\nA.ts\r\n----\r\n```typescript\r\nexport class A {\r\n  bar : number;\r\n  constructor() {\r\n    this.bar = 42;\r\n  }\r\n}\r\n```\r\n\r\nB.ts\r\n----\r\n```typescript\r\nimport {A} from \"./A\";\r\n\r\nexport class B {\r\n  foo:number;\r\n  constructor() {\r\n    this.foo = 42;\r\n  }\r\n}\r\n```\r\n\r\nA.js (output)\r\n----\r\n```javascript\r\ngoog.module('src.js.A');var module = module || {id: 'src/js/A.js'};\r\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes} checked by tsc\r\n */\r\n\r\nclass A {\r\n    constructor() {\r\n        this.bar = 42;\r\n    }\r\n}\r\nexports.A = A;\r\nfunction A_tsickle_Closure_declarations() {\r\n    /** @type {number} */\r\n    A.prototype.bar;\r\n}\r\n````\r\nB.js (output)\r\n----\r\n````javascript\r\ngoog.module('src.js.B');var module = module || {id: 'src/js/B.js'};\r\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes} checked by tsc\r\n */\r\n\r\nconst tsickle_forward_declare_1 = goog.forwardDeclare(\"src.ts.lib_cp_ts.lex_working.A\");\r\nclass B {\r\n    constructor() {\r\n        this.foo = 42;\r\n    }\r\n}\r\nexports.B = B;\r\nfunction B_tsickle_Closure_declarations() {\r\n    /** @type {number} */\r\n    B.prototype.foo;\r\n}\r\n````\r\n\r\n\r\n\r\nnon-working constellation:\r\n--\r\n\r\nA.ts\r\n----\r\n```typescript\r\nimport {B} from \"./B\";\r\n\r\nexport class A {\r\n  foo:number;\r\n  constructor() {\r\n    this.foo = 42;\r\n  }\r\n}\r\n```\r\n\r\nB.ts\r\n----\r\n```typescript\r\nexport class B {\r\n  bar : number;\r\n  constructor() {\r\n    this.bar = 42;\r\n  }\r\n}\r\n```\r\n\r\nA.js (output)\r\n----\r\n````javascript\r\ngoog.module('src.js.A');var module = module || {id: 'src/js/A.js'};\r\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes} checked by tsc\r\n */\r\n\r\nconst tsickle_forward_declare_1 = goog.forwardDeclare(\"src.ts.lib_cp_ts.lex_not_working.B\");\r\nclass A {\r\n  constructor() {\r\n    this.foo = 42;\r\n  }\r\n}\r\nexports.A = A;\r\nfunction A_tsickle_Closure_declarations() {\r\n  /** @type {number} */\r\n  A.prototype.foo;\r\n}\r\n````\r\n\r\nB.js (output)\r\n----\r\n````javascript\r\ngoog.module('src.js.B');var module = module || {id: 'src/js/B.js'};\r\n\r\nclass B {\r\n  constructor() {\r\n    this.bar = 42;\r\n  }\r\n}\r\nexports.B = B;\r\n````\r\n\r\nNote in B.js output the closure comments are missing.\r\nStrangly, the problem seems to be related to alphabetic order of the files.\r\n\r\nMy tsconfig.json\r\n````javascript\r\n{\r\n  \"compilerOptions\": {\r\n    \"experimentalDecorators\": true,\r\n    \"target\": \"es6\",\r\n    \"module\": \"commonjs\",\r\n    \"strictNullChecks\":false,\r\n    \"noImplicitAny\": true,\r\n    \"removeComments\": false,\r\n    \"sourceMap\": false,\r\n    \"noEmitHelpers\":true,\r\n    \"noEmitOnError\": false,\r\n    \"strict\":true,\r\n    \"outDir\": \"./src/js\"\r\n  },\r\n  \"exclude\": [],\r\n  \"include\":[\r\n    \"./src/ts/lib_cp_ts/lex-working/*.ts\"\r\n  ]\r\n}\r\n````\r\n\r\nAny ideas on this?"}}
{"actor":{"display_login":"martin19"}}