Skip to content

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

Merged
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
F3n67u:esm/build-addon
May 22, 2022
Merged

tools: refactor build-addons.js to ESM#43099
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
F3n67u:esm/build-addon

Conversation

@F3n67u

@F3n67uF3n67u commented May 14, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

Review requested:

  • @nodejs/tsc

@nodejs-github-botnodejs-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
@F3n67uF3n67u changed the title tools: refactor build-addons.js to esm moduletools: refactor build-addons.js to ESMMay 15, 2022
@F3n67u
F3n67uforce-pushed the esm/build-addon branch 3 times, most recently from 0346d31 to 4ea0c86CompareMay 15, 2022 04:04
@RaisinTen

Copy link
Copy Markdown
Member

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

@F3n67u

F3n67u commented May 16, 2022

Copy link
Copy Markdown
ContributorAuthor

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.

@RaisinTenRaisinTen 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
Copy Markdown
ContributorAuthor

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

@RaisinTen

Copy link
Copy Markdown
Member

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

@nodejs-github-bot

This comment was marked as outdated.

@F3n67u

F3n67u commented May 18, 2022

Copy link
Copy Markdown
ContributorAuthor

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

@RaisinTen

Copy link
Copy Markdown
Member

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

@F3n67u

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
Member

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

Comment threadtools/build-addons.mjs Outdated
Comment threadtools/build-addons.mjs Outdated
Comment threadtools/build-addons.mjs Outdated
@F3n67u
F3n67uforce-pushed the esm/build-addon branch 2 times, most recently from 4b24eb5 to e30b10bCompareMay 18, 2022 08:38
@nodejs-github-botnodejs-github-bot added the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label May 20, 2022
@aduh95aduh95 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-actionsgithub-actionsBot 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
Copy Markdown
Collaborator

@RaisinTenRaisinTen added the commit-queue Add this label to land a pull request using GitHub Actions. label May 22, 2022
@nodejs-github-botnodejs-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:masterMay 22, 2022
@nodejs-github-bot

Copy link
Copy Markdown
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>
@benglbengl 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

F3n67u commented Jun 10, 2022

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
Member

@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
Copy Markdown
ContributorAuthor

@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>
@targostargos mentioned this pull request Aug 3, 2022
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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.buildIssues and PRs related to build files or the CI.metaIssues and PRs related to the general management of the project.needs-ciPRs that need a full CI run.toolsIssues and PRs related to the tools directory.windowsIssues and PRs related to the Windows platform.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@F3n67u@nodejs-github-bot@RaisinTen@aduh95