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)
Sun, Apr 7, 5:50 PM
Unknown Object (File)
Sun, Apr 7, 5:48 PM
Unknown Object (File)
Sun, Apr 7, 5:37 PM
Unknown Object (File)
Wed, Mar 27, 2:18 PM
Unknown Object (File)
Mar 4 2024, 11:37 PM
Unknown Object (File)
Feb 24 2024, 7:48 AM
Unknown Object (File)
Feb 24 2024, 7:44 AM
Unknown Object (File)
Feb 24 2024, 6:21 AM
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.