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)
Wed, Nov 13, 7:57 PM
Unknown Object (File)
Wed, Nov 13, 7:57 PM
Unknown Object (File)
Tue, Nov 12, 4:54 PM
Unknown Object (File)
Tue, Nov 12, 4:29 PM
Unknown Object (File)
Tue, Nov 12, 3:19 PM
Unknown Object (File)
Oct 11 2024, 7:22 PM
Unknown Object (File)
Oct 11 2024, 7:22 PM
Unknown Object (File)
Oct 11 2024, 7:22 PM
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