mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
force number in protobuf generation
Anki's object IDs and millisecond timestamps fit within MAX_SAFE_INTEGER.
This commit is contained in:
parent
6e4cdc52a6
commit
829b99e5b2
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
# taken from example on
|
# taken from example on
|
||||||
# https://github.com/bazelbuild/rules_nodejs/commit/078243a217afe85a8c8f449838bb66ca87608aba
|
# https://github.com/bazelbuild/rules_nodejs/commit/078243a217afe85a8c8f449838bb66ca87608aba
|
||||||
# tweaked to use json-module instead of static-module, and disable strict long
|
# tweaked to use json-module instead of static-module, and force number
|
||||||
|
|
||||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ def protobufjs_library(name, proto, **kwargs):
|
||||||
"--target=static-module",
|
"--target=static-module",
|
||||||
"--wrap=default",
|
"--wrap=default",
|
||||||
#"--strict-long", # Force usage of Long type with int64 fields
|
#"--strict-long", # Force usage of Long type with int64 fields
|
||||||
|
"--force-number",
|
||||||
"--out=$@",
|
"--out=$@",
|
||||||
"$(execpaths %s)" % proto_target,
|
"$(execpaths %s)" % proto_target,
|
||||||
],
|
],
|
||||||
|
@ -94,6 +95,7 @@ def protobufjs_library(name, proto, **kwargs):
|
||||||
"--target=json-module",
|
"--target=json-module",
|
||||||
"--wrap=default",
|
"--wrap=default",
|
||||||
#"--strict-long", # Force usage of Long type with int64 fields
|
#"--strict-long", # Force usage of Long type with int64 fields
|
||||||
|
"--force-number",
|
||||||
"--out=$@",
|
"--out=$@",
|
||||||
"$(execpaths %s)" % proto_target,
|
"$(execpaths %s)" % proto_target,
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue