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

Merged
merged 10 commits into from
Jan 27, 2025

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 27, 2025 1:23pm

Copy link

nx-cloud bot commented Jan 21, 2025

View your CI Pipeline Execution ↗ for commit b9b72a6.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 31m 14s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check --base=65534... ✅ Succeeded 23s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 21s View ↗
nx documentation --no-dte ✅ Succeeded 1m 4s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-27 13:53:45 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 Outdated 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.

@juristr juristr enabled auto-merge (squash) January 27, 2025 12:47
@juristr juristr dismissed mhartington’s stale review January 27, 2025 13:21

changes have been implemented

@juristr juristr merged commit 9f7120a into nrwl:master Jan 27, 2025
6 checks passed
juristr added a commit that referenced this pull request Jan 27, 2025
Copy link

github-actions bot commented Feb 2, 2025

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants