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
F3342706: D6770.id22706.diff
Fri, Nov 22, 1:55 AM
F3342703: D6770.id.diff
Fri, Nov 22, 1:55 AM
F3342696: D6770.diff
Fri, Nov 22, 1:54 AM
Unknown Object (File)
Wed, Nov 13, 6:02 PM
Unknown Object (File)
Wed, Nov 13, 1:06 AM
Unknown Object (File)
Sun, Oct 27, 10:05 PM
Unknown Object (File)
Oct 23 2024, 10:11 AM
Unknown Object (File)
Oct 23 2024, 10:11 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.