Open kittaakos opened 4 years ago
Have you tried npx run build @theia/core
to build only core, not the whole project together. I don't think we can change how tsc builds all packages as one project. It would be a feature request for typescript itself?
Have you tried
npx run build @theia/core
to build only core, not the whole project together.
I wanted to build everything.
don't think we can change how tsc builds all packages as one project
It used to work, didn't it?
It used to work, didn't it?
It was without build mode before each package was build as one project (in a new process). We won't go back to it because it is much slower and CPU intensive, now all packages are built together as one project in one process. Maybe typescript can introduce some flag for build mode to fail faster.
@akosyakov, do we use the compile-references.js
to compile the repo content?
We use tsc -b
: https://github.com/eclipse-theia/theia/blob/master/package.json#L51
compile-references
establishes references between typescript packages that they can be compiled as one project in the build mode
for details: http://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript
@kittaakos I just shortened the log so it's easier to read the comments of the issue 🙈
@kittaakos I noticed the same issue when doing yarn
from the root. TBF I think it is something to discuss with the TypeScript team, because it looks odd to me as well.
Description
If I have any kind of compiler errors in `@theia/core` for instance, I want to see those errors only, not all the errors of the downstream extensions of `@theia/core` when I run `yarn`. Example, I created a local branch and have changed a few things, wanted to see what APIs have changed for `electron@7.x`. When I build Theia (with `yarn`) I see the original error in the console and dozens of follow-up issues: Relevant log and the build *should* fail at this point:Log
``` akos.kitta@Akoss-MacBook-Pro theia % git branch electron-7.x akos.kitta@Akoss-MacBook-Pro theia % git checkout electron-7.x M dev-packages/application-manager/package.json M dev-packages/electron/package.json Switched to branch 'electron-7.x' akos.kitta@Akoss-MacBook-Pro theia % git clean -ffxqd akos.kitta@Akoss-MacBook-Pro theia % yarn yarn install v1.21.1 $ node-gyp install gyp info it worked if it ends with ok gyp info using node-gyp@3.8.0 gyp info using node@10.15.3 | darwin | x64 gyp http GET https://nodejs.org/download/release/v10.15.3/node-v10.15.3-headers.tar.gz gyp http 200 https://nodejs.org/download/release/v10.15.3/node-v10.15.3-headers.tar.gz gyp http GET https://nodejs.org/download/release/v10.15.3/SHASUMS256.txt gyp http 200 https://nodejs.org/download/release/v10.15.3/SHASUMS256.txt 10.15.3 gyp info ok [1/5] 🔍 Validating package.json... [2/5] 🔍 Resolving packages... [3/5] 🚚 Fetching packages... warning monaco-languageclient@0.10.2: The engine "vscode" appears to be invalid. warning vscode-languageclient@5.3.0-next.9: The engine "vscode" appears to be invalid. [4/5] 🔗 Linking dependencies... warning " > chai-string@1.5.0" has unmet peer dependency "chai@^4.1.2". warning "workspace-aggregator-f2d0956e-1338-48ae-a720-ea9937c52690 > @theia/application-manager > font-awesome-webpack@0.0.5-beta.2" has unmet peer dependency "font-awesome@>=4.3.0". warning "workspace-aggregator-f2d0956e-1338-48ae-a720-ea9937c52690 > @theia/cli > requestretry@3.1.0" has unmet peer dependency "request@2.*.*". warning "workspace-aggregator-f2d0956e-1338-48ae-a720-ea9937c52690 > @theia/messages > react-perfect-scrollbar@1.5.3" has unmet peer dependency "react@>=16.3.3". warning "workspace-aggregator-f2d0956e-1338-48ae-a720-ea9937c52690 > @theia/messages > react-perfect-scrollbar@1.5.3" has unmet peer dependency "react-dom@>=16.3.3". warning "workspace-aggregator-f2d0956e-1338-48ae-a720-ea9937c52690 > @theia/scm > react-autosize-textarea@7.0.0" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0". warning "workspace-aggregator-f2d0956e-1338-48ae-a720-ea9937c52690 > @theia/scm > react-autosize-textarea@7.0.0" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0". warning "workspace-aggregator-f2d0956e-1338-48ae-a720-ea9937c52690 > @theia/application-manager > font-awesome-webpack > less-loader@2.2.3" has incorrect peer dependency "less@^2.3.1". warning Workspaces can only be enabled in private projects. [5/5] 🔨 Building fresh packages... success Saved lockfile. $ node scripts/post-install.js @theia/electron last logs: Downloading tmp-45491-1-SHASUMS256.txt-7.1.14 [============================================>] 100.0% of 5.62 kB (5.62 kB/s) (Mon, 02 Mar 2020 14:13:49 GMT) info: Downloaded ffmpeg shared library { version: "7.1.14", dist: "/Users/akos.kitta/git/theia/node_modules/electron/dist" }. (Mon, 02 Mar 2020 14:13:49 GMT) info: Successfully replaced "/Users/akos.kitta/git/theia/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Libraries/libffmpeg.dylib". (Mon, 02 Mar 2020 14:13:49 GMT) info: "/Users/akos.kitta/git/theia/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Libraries/libffmpeg.dylib" does not contain proprietary codecs (16 found). $ yarn prepare:travis && yarn prepare:references && yarn prepare:build && yarn prepare:hoisting && yarn download:plugins yarn run v1.21.1 $ node scripts/prepare-travis.js ✨ Done in 1.95s. yarn run v1.21.1 $ node scripts/compile-references.js ✨ Done in 0.66s. yarn run v1.21.1 $ yarn build && run lint && run build "@theia/example-*" --stream --parallel $ tsc -b configs/root-compilation.tsconfig.json --verbose [3:13:55 PM] Projects in this build: * dev-packages/application-package/compile.tsconfig.json * dev-packages/application-manager/compile.tsconfig.json * dev-packages/cli/compile.tsconfig.json * packages/core/compile.tsconfig.json * packages/output/compile.tsconfig.json * packages/process/compile.tsconfig.json * packages/filesystem/compile.tsconfig.json * packages/variable-resolver/compile.tsconfig.json * packages/workspace/compile.tsconfig.json * packages/languages/compile.tsconfig.json * packages/editor/compile.tsconfig.json * packages/navigator/compile.tsconfig.json * packages/markers/compile.tsconfig.json * packages/outline-view/compile.tsconfig.json * packages/monaco/compile.tsconfig.json * packages/callhierarchy/compile.tsconfig.json * packages/console/compile.tsconfig.json * packages/userstorage/compile.tsconfig.json * packages/preferences/compile.tsconfig.json * packages/terminal/compile.tsconfig.json * packages/task/compile.tsconfig.json * packages/debug/compile.tsconfig.json * packages/editor-preview/compile.tsconfig.json * packages/file-search/compile.tsconfig.json * packages/keymaps/compile.tsconfig.json * packages/getting-started/compile.tsconfig.json * packages/scm/compile.tsconfig.json * packages/scm-extra/compile.tsconfig.json * packages/git/compile.tsconfig.json * packages/json/compile.tsconfig.json * packages/messages/compile.tsconfig.json * packages/metrics/compile.tsconfig.json * packages/mini-browser/compile.tsconfig.json * packages/plugin/compile.tsconfig.json * packages/search-in-workspace/compile.tsconfig.json * packages/plugin-ext/compile.tsconfig.json * packages/plugin-dev/compile.tsconfig.json * packages/plugin-ext-vscode/compile.tsconfig.json * packages/plugin-metrics/compile.tsconfig.json * packages/preview/compile.tsconfig.json * packages/typehierarchy/compile.tsconfig.json * examples/api-samples/compile.tsconfig.json * examples/electron/compile.tsconfig.json * configs/root-compilation.tsconfig.json [3:13:55 PM] Project 'dev-packages/application-package/compile.tsconfig.json' is out of date because output file 'dev-packages/application-package/lib/application-package.js' does not exist [3:13:55 PM] Building project '/Users/akos.kitta/git/theia/dev-packages/application-package/compile.tsconfig.json'... [3:13:57 PM] Project 'dev-packages/application-manager/compile.tsconfig.json' is out of date because output file 'dev-packages/application-manager/lib/application-package-manager.js' does not exist [3:13:57 PM] Building project '/Users/akos.kitta/git/theia/dev-packages/application-manager/compile.tsconfig.json'... [3:13:57 PM] Project 'dev-packages/cli/compile.tsconfig.json' is out of date because output file 'dev-packages/cli/lib/check-hoisting.js' does not exist [3:13:57 PM] Building project '/Users/akos.kitta/git/theia/dev-packages/cli/compile.tsconfig.json'... [3:13:57 PM] Project 'packages/core/compile.tsconfig.json' is out of date because output file 'packages/core/lib/browser/about-dialog.js' does not exist [3:13:57 PM] Building project '/Users/akos.kitta/git/theia/packages/core/compile.tsconfig.json'... packages/core/src/electron-browser/keyboard/electron-keyboard-layout-change-notifier.ts:38:49 - error TS2345: Argument of type '(event: Event