-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: run tsc
relative to the root directory of loopback-next monorepo
#1189
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
Conversation
2e6b0a3
to
7f5bce4
Compare
+1 for adding -1 for implementing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides my comment above, please update loopback/build's README to mention the new script(s).
17e91dd
to
f1fe2e5
Compare
tsc
relative the root directory of loopback-next monorepo
tsc
relative the root directory of loopback-next monorepo tsc
relative to the root directory of loopback-next monorepo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are ok with removing isVSCode
per my comment above, then the part of this patch adding LERNA_ROOT_PATH only can be landed without further review.
bin/run-lerna.js
Outdated
process.env.LERNA_ROOT_PATH = rootPath; | ||
let args = argv.slice(2); | ||
|
||
// Force lerna command runs in non-parallel mode for VSCode builds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not very happy with this solution, it will significantly slow down builds triggered from VS Code. Can we either leave this part out of this initial pull request?
Here is what I would like us to eventually implement:
- At minimum, have two VSCode tasks - one for the usual "fast" build that reports broken error paths, anther for a "slow" build that works well with PROBLEMS window.
- Ideally, we should invoke typescript in parallel via some sort of a tool that can merge the output in a clever way, or perhaps tell Lerna to not print those prefixes.
Either way, I'd like to have the option to run the build in parallel mode, it stays my default mode most of the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I misunderstood what you want for VSCode.
Here is what I found out:
- Lerna passes the package name as a tag to
strong-log-transformer
(from strongloop!). See https://github.com/lerna/lerna/blob/2.x/src/ChildProcessUtilities.js#L44-L45 - I can try to create a patch against lerna
I'll remove the VSCode check for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I contributed a patch to lerna - lerna/lerna#1352
The script sets `LERNA_ROOT_PATH` to the root directory of loopback-next monorepo and run `lerna` commands. It also detects VSCode and disables parallel mode.
👏 |
This PR adds
run-lerna
script to allowLERNA_ROOT_PATH
to be passed intolerna
commands.The run-lerna script adds the following logic:
Fixes #1010
Checklist
npm test
passes on your machinepackages/cli
were updatedpackages/example-*
were updated