{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/17823","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/17823/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/17823/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/17823/events","html_url":"https://github.com/Microsoft/TypeScript/issues/17823","id":250544303,"number":17823,"title":"Inconsistence diagnostics result","user":{"login":"davidmatas","id":271760,"avatar_url":"https://avatars2.githubusercontent.com/u/271760?v=4","gravatar_id":"","url":"https://api.github.com/users/davidmatas","html_url":"https://github.com/davidmatas","followers_url":"https://api.github.com/users/davidmatas/followers","following_url":"https://api.github.com/users/davidmatas/following{/other_user}","gists_url":"https://api.github.com/users/davidmatas/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmatas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmatas/subscriptions","organizations_url":"https://api.github.com/users/davidmatas/orgs","repos_url":"https://api.github.com/users/davidmatas/repos","events_url":"https://api.github.com/users/davidmatas/events{/privacy}","received_events_url":"https://api.github.com/users/davidmatas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-16T08:08:39Z","updated_at":"2017-08-16T08:08:39Z","closed_at":null,"body":"We are having memory problems with the build of our project, and we have started to debug with diagnostic tool to see from where this problems come out. \r\n\r\nSo the approach we have followed is to try a `git bisect` approach to navigate to different points of the git history and execute the diagnostic tool to see the results:\r\n\r\n```\r\ngo to a SHA point --> ./node_modules/.bin/tsc --diagnostics --> see results\r\n```\r\n\r\nIn some of that points diagnostic tool output the problem with the memory:\r\n\r\n```\r\n<--- Last few GCs --->\r\n\r\n[8419:0x102801600]   241827 ms: Mark-sweep 1407.0 (1507.6) -> 1406.9 (1478.1) MB, 1554.8 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1555 ms) last resort\r\n[8419:0x102801600]   243178 ms: Mark-sweep 1406.9 (1478.1) -> 1406.9 (1478.1) MB, 1349.2 / 0.0 ms  last resort\r\n\r\n\r\n<--- JS stacktrace --->\r\n\r\n==== JS stack trace =========================================\r\n\r\nSecurity context: 0x3192c811bbd9 <JS Object>\r\n    2: createTypeNodeFromObjectType [/Users/dave/projects/work/audiense/audiense/nebula/node_modules/ts-jest/node_modules/typescript/lib/tsc.js:23775] [pc=0x1fc0b05777eb](this=0xb2d5cb8a1e1 <JS Global Object>,type=0x96be025b41 <a Type with map 0x2f8e9d10e859>)\r\n    3: createAnonymousTypeNode [/Users/dave/projects/work/audiense/audiense/nebula/node_modules/ts-jest/node_modules/typescript/lib/tsc....\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\r\n 1: node::Abort() [/usr/local/bin/node]\r\n 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node]\r\n 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]\r\n 4: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [/usr/local/bin/node]\r\n 5: v8::internal::LCodeGenBase::PopulateDeoptimizationData(v8::internal::Handle<v8::internal::Code>) [/usr/local/bin/node]\r\n 6: v8::internal::LChunk::Codegen() [/usr/local/bin/node]\r\n 7: v8::internal::HCompilationJob::FinalizeJobImpl() [/usr/local/bin/node]\r\n 8: v8::internal::(anonymous namespace)::GetOptimizedCode(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ConcurrencyMode, v8::internal::BailoutId, v8::internal::JavaScriptFrame*) [/usr/local/bin/node]\r\n 9: v8::internal::Compiler::Compile(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag) [/usr/local/bin/node]\r\n10: v8::internal::Runtime_CompileLazy(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]\r\n11: 0x1fc0af9840bd\r\nzsh: abort      ./node_modules/.bin/tsc --diagnostics\r\n```\r\n\r\nBut then, we navigate to a know status of the project, were diagnostic tool worked well the last time, and we also obtain the memory problem output. So **the problem is** we are not obtaining a confidence and consistence result between executions\r\n\r\nAre diagnostic tool generating some tmp files between executions that we should delete to obtain a consistence result? Any clue why is this happening?\r\n\r\n**TypeScript Version:**  2.4.1 / 2.5.0-dev.20170815 \r\nOSX 10.12.5 - Node 4.4.3 (also happen with other versions)\r\n\r\n**Code**\r\n\r\nI'm going to leave here my config\r\n```\r\n{\r\n  \"compilerOptions\": {\r\n    \"allowJs\": true,\r\n    \"allowSyntheticDefaultImports\": true,\r\n    \"jsx\": \"react\",\r\n    \"lib\": [\"es7\", \"dom\"],\r\n    \"module\": \"es2015\",\r\n    \"moduleResolution\": \"node\",\r\n    \"noImplicitAny\": false,\r\n    \"outDir\": \"build\",\r\n    \"preserveConstEnums\": true,\r\n    \"removeComments\": true,\r\n    \"sourceMap\": true,\r\n    \"strictNullChecks\": true,\r\n    \"noUnusedLocals\": true,\r\n    \"target\": \"es5\",\r\n    \"baseUrl\": \".\",\r\n    \"paths\": {\r\n      \"*\": [\"app/*\", \"*\"],\r\n      \"domain/*\": [\"../core/domain-model/*\"]\r\n    },\r\n    \"rootDirs\": [\r\n      \"app\",\r\n      \".\"\r\n    ]\r\n  },\r\n  \"exclude\": [\r\n    \"node_modules\",\r\n    \"storybook\"\r\n  ]\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nDiagnostic should always return the same result between executions\r\n\r\n**Actual behavior:**\r\nAfter outputs a memory problem, diagnostic tool will always returns a memory problem in a point when it returned a result before\r\n"}}
{"actor":{"display_login":"davidmatas"}}