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, Sep 10, 4:39 PM
Unknown Object (File)
Tue, Sep 10, 4:39 PM
Unknown Object (File)
Tue, Sep 10, 4:39 PM
Unknown Object (File)
Tue, Sep 10, 4:38 PM
Unknown Object (File)
Tue, Sep 10, 4:36 PM
Unknown Object (File)
Sep 4 2024, 2:07 PM
Unknown Object (File)
Aug 10 2024, 7:01 AM
Unknown Object (File)
Aug 10 2024, 7:01 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
No Lint Coverage
Unit
No Test Coverage

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