-
Notifications
You must be signed in to change notification settings - Fork 820
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
chore: speed up builds #1748
chore: speed up builds #1748
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1748 +/- ##
==========================================
+ Coverage 92.07% 92.09% +0.01%
==========================================
Files 166 166
Lines 5593 5593
Branches 1199 1199
==========================================
+ Hits 5150 5151 +1
+ Misses 443 442 -1
|
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.
What has happened to version.ts
?
I would create a script that will generate automatically something like references.ts
that probably should not be a part of the repo but should be generated during compilation or once before watch or tests. Then it will be a matter of requiring this file here. I would like to avoid a time consuming process which is also error prone and will be hard to remember to do it when you add a new package etc. This for sure can be automated.
How will this work for examples. Currently I can add examples/nameOfExample
to lerna.json and it will bootstrap correctly so I can debug all easily. How will this work after it ?
I'm not done yet, but my goal is to remove the update version on every build which starts a new process and does multiple file read/writes for each of 37 packages. On my machine it's a significant source of overhead. And instead do it as a
The tsconfig.json references are auto-generated by the
Will work the same way. You just have to make sure the project is built first by running |
Additional benefits:
|
96b64b2
to
950c545
Compare
- copy protos in postcompile - separate tsconfig for docs - add backwards compatibility check to regular build - bump version.ts as part of version change
packages/opentelemetry-core/test/trace/fixtures/test-package/package.json
Outdated
Show resolved
Hide resolved
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.
lgtm,
I think it will be good to add some doc in readme (DEV SETUP for example) explaining
- what is being generated automatically
- How should we boostrap / install things now (if they are any differences etc.)
- If I were to create a new package or add a new node dependency how would that work.
- What is the typical dev setup / cycle after this change, how can we run a watch for all etc. to be able to debug stuff .
I hope you can address this prior to merge
|
…ttribute from DynamoDB spans (open-telemetry#1748) * feat: add configuration to customise dynamodb statement serialization * fix: format readme * chore: pass DiagLogger to DynamoDB instrumentation * chore: omit db statement when serializer is not configured or when it returned undefined Allow for passing operation to serializer * chore: run lint:fix --------- Co-authored-by: Amir Blum <[email protected]>
This PR aims to speed up compilations by running a single typescript process from the root of the project. CI is marginally faster, but local development is drastically faster.
Summary
composite
flag in tsconfig to build all packages with a single compile command.references
list in tsconfig. This list is automatically kept up to date usingupdate-ts-references
Additional benefits
tsc --build --watch
will now build and watch the whole repo so a change inapi
will trigger a rebuild and potentially show errors intracing
or other packages.npm run compile
in a package will build that package and its dependencies, using incremental builds to skip things that don't need to be rebuilt.