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

tools: refactor build-addons.js to ESM #43099

Merged
merged 1 commit into from
May 22, 2022

Conversation

F3n67u
Copy link
Member

@F3n67u F3n67u commented May 14, 2022

Changes

  • convert build-addons.js to ESM
  • remove the main function and use top-level await which ESM bring us

Motivation

  1. make tools directory's js file format more consistent
  2. shifting towards ESM which is the official standard.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. windows Issues and PRs related to the Windows platform. labels May 14, 2022
@F3n67u F3n67u marked this pull request as draft May 14, 2022 14:20
@F3n67u F3n67u marked this pull request as ready for review May 14, 2022 14:21
@F3n67u F3n67u changed the title tools: refactor build-addons.js to esm module tools: refactor build-addons.js to ESM May 15, 2022
@F3n67u F3n67u force-pushed the esm/build-addon branch 3 times, most recently from 0346d31 to 4ea0c86 Compare May 15, 2022 04:04
@RaisinTen
Copy link
Contributor

Code LGTM but could you please try to remove the merge commit and rebase instead? Our tooling runs into problems with merge commits.

@F3n67u
Copy link
Member Author

F3n67u commented May 16, 2022

Code LGTM but could you please try to remove the merge commit and rebase instead? Our tooling runs into problems with merge commits.

@RaisinTen Done! Thanks for the review.

@RaisinTen RaisinTen added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 16, 2022
@nodejs-github-bot

This comment was marked as outdated.

@F3n67u
Copy link
Member Author

F3n67u commented May 16, 2022

@RaisinTen ci failed. I have no clue what caused it to fail. could you help to take a look?

@RaisinTen
Copy link
Contributor

It's a timeout on ubi81_sharedlibs_openssl111fips_x64, will rerun CI.

@nodejs-github-bot

This comment was marked as outdated.

@F3n67u
Copy link
Member Author

F3n67u commented May 18, 2022

@RaisinTen jenkins ci timeout again. could you trigger a rerun?

@RaisinTen
Copy link
Contributor

The pending status in the GitHub UI is misleading because the Jenkins CI is actually fully green now.

@F3n67u
Copy link
Member Author

F3n67u commented May 18, 2022

The pending status in the GitHub UI is misleading because the Jenkins CI is actually fully green now.

great. then lets wait this pr merged.

@RaisinTen
Copy link
Contributor

We can get this merged in 3 days or sooner if we get another approval. :)

tools/build-addons.mjs Outdated Show resolved Hide resolved
tools/build-addons.mjs Outdated Show resolved Hide resolved
tools/build-addons.mjs Outdated Show resolved Hide resolved
@F3n67u F3n67u force-pushed the esm/build-addon branch 2 times, most recently from 4b24eb5 to e30b10b Compare May 18, 2022 08:38
@nodejs-github-bot nodejs-github-bot added the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label May 20, 2022
@aduh95 aduh95 added request-ci Add this label to start a Jenkins CI on a PR. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels May 20, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 20, 2022
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@RaisinTen RaisinTen added the commit-queue Add this label to land a pull request using GitHub Actions. label May 22, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 22, 2022
@nodejs-github-bot nodejs-github-bot merged commit b4398df into nodejs:master May 22, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in b4398df

bengl pushed a commit that referenced this pull request May 30, 2022
PR-URL: #43099
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@bengl bengl mentioned this pull request May 31, 2022
juanarbol pushed a commit that referenced this pull request May 31, 2022
PR-URL: #43099
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@F3n67u F3n67u deleted the esm/build-addon branch June 10, 2022 01:51
@F3n67u
Copy link
Member Author

F3n67u commented Jun 10, 2022

Code LGTM but could you please try to remove the merge commit and rebase instead? Our tooling runs into problems with merge commits.

@RaisinTen are multiple commits in one pr supported by node tooling? for example, I make an initial commit and then fix some code review problems on several additional commits.

Now I always keep one commit in pr and force push to reflect code review requested change. I don't know which one is a better practice in node land. I used to always add a new commit when some change need to be added to the pr.

@RaisinTen
Copy link
Contributor

@F3n67u yes, our tooling supports multiple commits.

If the commits that come after the first one are just fixup commits, we can land the PR with the commit-queue-squash label, in which case the bot that lands PRs would squash all the commits into the first one for you. The PR however, would still have separate commits. So it's fine if you don't squash the commits yourself and force push.

And for PRs where you would like those to land with several commits, we could signal that to the bot by applying the commit-queue-rebase label.

So my suggestion would be to avoid force-pushing your commits into a single change because it's easier for reviewers to track the changes that were made after their last reviews. :)

However, you should consider rebasing and force-pushing if it's required to make sure that your PR works even after updating the base branch with the latest changes.

And if it's the case that the commits that follow your first one are essentially a revert and a fresh rewrite of your PR, that's when you should consider rebasing and removing the initial changes because those might be distracting and are not really needed in your PR now.

@F3n67u
Copy link
Member Author

F3n67u commented Jun 10, 2022

@F3n67u yes, our tooling supports multiple commits.

If the commits that come after the first one are just fixup commits, we can land the PR with the commit-queue-squash label, in which case the bot that lands PRs would squash all the commits into the first one for you. The PR however, would still have separate commits. So it's fine if you don't squash the commits yourself and force push.

And for PRs where you would like those to land with several commits, we could signal that to the bot by applying the commit-queue-rebase label.

So my suggestion would be to avoid force-pushing your commits into a single change because it's easier for reviewers to track the changes that were made after their last reviews. :)

However, you should consider rebasing and force-pushing if it's required to make sure that your PR works even after updating the base branch with the latest changes.

And if it's the case that the commits that follow your first one are essentially a revert and a fresh rewrite of your PR, that's when you should consider rebasing and removing the initial changes because those might be distracting and are not really needed in your PR now.

Got it. thanks for the info.

danielleadams pushed a commit that referenced this pull request Jun 27, 2022
PR-URL: #43099
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this pull request Jul 12, 2022
PR-URL: #43099
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this pull request Jul 31, 2022
PR-URL: #43099
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
PR-URL: nodejs/node#43099
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. build Issues and PRs related to build files or the CI. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants