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

module: skip NODE_COMPILE_CACHE when policy is enabled #52577

Merged
merged 3 commits into from Apr 25, 2024

Conversation

joyeecheung
Copy link
Member

It might be worth designing a policy for the compilation cache. For now, just skip the cache when policy is enabled.

It might be worth designing a policy for the compilation cache. For
now, just skip the cache when policy is enabled.
@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 18, 2024
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Apr 18, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 18, 2024
@nodejs-github-bot
Copy link
Collaborator

@joyeecheung
Copy link
Member Author

huh there isn't a team for policy, it seems, so cc @nodejs/startup @nodejs/loaders @nodejs/security

@@ -1096,6 +1096,12 @@ void Environment::InitializeCompileCache() {
dir_from_env.empty()) {
return;
}
if (!options()->experimental_policy.empty()) {
Debug(this,
Copy link
Member

Choose a reason for hiding this comment

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

Could this be a warning instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

The environment variable is designed to be as silent as possible. I don't think there's anything to warn - you don't get a speed up and that is all, your code will still work as intended. If you are using policy it's likely that you are already aware this is already leading to a slowdown for every module loaded due to all the checks required.

Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

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

thanks for following up with this!

@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 22, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 22, 2024
@nodejs-github-bot
Copy link
Collaborator

@joyeecheung
Copy link
Member Author

Updated the test to skip in no crypto builds because policy requires crypto to work.

@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 22, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 22, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@joyeecheung joyeecheung added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 25, 2024
@joyeecheung joyeecheung added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Apr 25, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 25, 2024
@nodejs-github-bot nodejs-github-bot merged commit 2231be6 into nodejs:main Apr 25, 2024
61 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 2231be6

aduh95 pushed a commit that referenced this pull request Apr 29, 2024
It might be worth designing a policy for the compilation cache. For
now, just skip the cache when policy is enabled.

PR-URL: #52577
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants