Skip to content
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

Typescript project references article #29698

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ZackDeRose
Copy link
Member

@ZackDeRose ZackDeRose commented Jan 21, 2025

@ZackDeRose ZackDeRose requested a review from a team as a code owner January 21, 2025 13:42
Copy link

vercel bot commented Jan 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Jan 24, 2025 9:11pm

Copy link

nx-cloud bot commented Jan 21, 2025

View your CI Pipeline Execution ↗ for commit ce574ef.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 34m 13s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 57s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx format:check --base=15fc5... ✅ Succeeded 17s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 16s View ↗
nx documentation --no-dte ✅ Succeeded 1m 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-24 21:41:41 UTC

Copy link
Contributor

@mhartington mhartington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments

docs/blog/2025-01-21-project-references.md Outdated Show resolved Hide resolved
docs/blog/2025-01-21-project-references.md Outdated Show resolved Hide resolved
docs/blog/2025-01-21-project-references.md Show resolved Hide resolved
Copy link
Contributor

@mhartington mhartington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments

docs/blog/2025-01-21-project-references.md Outdated Show resolved Hide resolved
docs/blog/2025-01-21-project-references.md Outdated Show resolved Hide resolved
docs/blog/2025-01-21-project-references.md Outdated Show resolved Hide resolved
docs/blog/2025-01-21-project-references.md Outdated Show resolved Hide resolved
docs/blog/2025-01-21-project-references.md Outdated Show resolved Hide resolved
docs/blog/images/2025-01-21/results.png Outdated Show resolved Hide resolved
docs/blog/2025-01-21-project-references.md Outdated Show resolved Hide resolved
docs/blog/2025-01-21-project-references.md Outdated Show resolved Hide resolved

![results](/blog/images/2025-01-21/results.png)

In addition to the time savings we saw reduced memory usage (~< 1GB vs 3 GB). This makes sense given what we saw about how project references work. This is actually a very good thing for CI pipelines, as exceeding memory usuage is a common issue we see with our clients for their TypeScript builds. Less memory usuage means we can use smaller machines, which saves on the CI costs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should emphasize the "performance" part more and where this comes from. it is kinda mentioned, but maybe we can emphasize it better 🤔. Like the "breaking down TS programs" into smaller units, the incremental nature of it, the fact that there are tsconfig.tsbuildinfo files generated which tsc -b uses to avoid recomputation of types etc, thus being incremental etc :)

docs/blog/2025-01-21-project-references.md Outdated Show resolved Hide resolved
@kbrilla
Copy link

kbrilla commented Jan 24, 2025

Will there be a migration for this? If so, maybe do point it out in this article, so people won't start to try and migrate to new project references on their own. Also I saw somewhere that it won't work for Angular for now? Is that the case? If so maybe also add note about it here.

@juristr
Copy link
Member

juristr commented Jan 24, 2025

Will there be a migration for this?

We're looking into that. For now it's behind a flag --workspaces as we want more feedback. But yes, there will be guides and potentially some automated migration.

There's a series of articles coming out, this one specifically just talks about project references

Also I saw somewhere that it won't work for Angular for now? Is that the case? If so maybe also add note about it here.

It doesn't work for Angular. That's not on the Nx side, but on the Angular side. We're looking into it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants