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

update nodejs and add compile cache #3430

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Jan 29, 2025

Passing NODE_COMPILE_CACHE environment variable enables compile cache on node.js

@anonrig anonrig requested review from mikea and fhanau January 29, 2025 17:26
@anonrig anonrig requested review from a team as code owners January 29, 2025 17:26
@@ -28,6 +28,9 @@ js_binary(
":types_lib",
],
entry_point = "scripts/build-types.js",
env = {
"NODE_COMPILE_CACHE": "/tmp/workerd-types-compile-cache",
Copy link
Member Author

Choose a reason for hiding this comment

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

@fhanau @mikea any suggestions on what to pass here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean... do we need this? This action is only used to generate types right?

Copy link
Member

@jasnell jasnell Jan 29, 2025

Choose a reason for hiding this comment

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

Not strictly needed, no, but results in a significant performance improvement when used correctly... that is to say, there's no reason not to use it unless something in our setup precludes it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So does it just needs to be any temp directory then? We could try to add it to the Actions-based CI cache located in ~/bazel-disk-cache but I'm unsure if it really matters based on how long type generation takes.

Copy link
Member Author

Choose a reason for hiding this comment

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

It can be any temp directory, but something that can be preserved in remote cache as well would be really good.

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.

3 participants