Page MenuHomePhabricator

[keyserver] Updating `yarn` scripts to run rust-node-addon build
AbandonedPublic

Authored by varun on Feb 20 2023, 2:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 3:23 AM
Unknown Object (File)
Tue, Nov 26, 6:05 AM
Unknown Object (File)
Nov 22 2024, 1:55 AM
Unknown Object (File)
Nov 22 2024, 1:55 AM
Unknown Object (File)
Nov 22 2024, 1:54 AM
Unknown Object (File)
Nov 13 2024, 6:02 PM
Unknown Object (File)
Nov 13 2024, 1:06 AM
Unknown Object (File)
Oct 27 2024, 10:05 PM
Subscribers

Details

Summary

This diff updating prod and dev yarn scripts for the keyserver to include the building of the rust-node-addon. To build and re-build the rust-node-addon, we should run yarn workspace rust-node-addon build command.
Adding the building command to the prod and dev scripts makes sense to use a single command to build all of the sources and dependencies.

Linear task: ENG-3022

Test Plan

Calling yarn prod will build/re-build the rust-node-addon rust library with the production option for the napi-rs.
Calling yarn dev will build/re-build the rust-node-addon rust library with the debug option for the napi-rs.

Diff Detail

Repository
rCOMM Comm
Branch
update-yarn-with-napi-build
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

max held this revision as a draft.
max published this revision for review.Feb 20 2023, 2:12 AM
max edited the summary of this revision. (Show Details)
max edited the test plan for this revision. (Show Details)
max added reviewers: varun, tomek.

Since rust-node-addon's build script is already triggered from a postinstall hook, the only change here is to rebuild it every time the user runs yarn dev or yarn prod in keyserver.

This seems rather unnecessary for yarn prod, which is rarely run outside of a production setting.

As for dev, I think it's rare that somebody working on keyserver will need to rebuild rust-node-addon. Can we design this based on that assumption?

At a high level I'm not really sure we need this, so would appreciate more context for why you think it's necessary.

Are incremental builds like < 2 seconds or are they going to take a while (eg Rust portion of iOS build)?

ashoat requested changes to this revision.Feb 20 2023, 2:56 PM
This revision now requires changes to proceed.Feb 20 2023, 2:56 PM
varun abandoned this revision.
varun edited reviewers, added: max; removed: varun.