Page MenuHomePhabricator

[native_rust_library] Write state version as build-time constant
ClosedPublic

Authored by bartek on Jun 3 2024, 4:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 2, 1:07 PM
Unknown Object (File)
Mon, Jul 1, 3:06 AM
Unknown Object (File)
Tue, Jun 25, 8:16 PM
Unknown Object (File)
Sun, Jun 23, 9:59 PM
Unknown Object (File)
Sun, Jun 23, 11:36 AM
Unknown Object (File)
Thu, Jun 20, 10:48 PM
Unknown Object (File)
Fri, Jun 14, 3:44 AM
Unknown Object (File)
Thu, Jun 13, 4:10 AM
Subscribers

Details

Summary

We're going to pass state version in gRPC metadata - this updates native_rust_library build.rs to scrap it
from native/redux/persist.js.
Some context in ENG-8279.

Test Plan

cd native_rust_library && cargo build --verbose. In IDE, added use crate::STATE_VERSION then used my IDE
to jump to definition. Found generated value matching the value from persist.js.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Jun 3 2024, 5:43 AM

Can we add a code comment to persist.js explaining that this script parses the file, so that a dev doesn't eg. rename the constant or move it without being aware of this?

Good idea. Added comment to persist.js

This revision is now accepted and ready to land.Jun 4 2024, 9:06 AM