summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCasper <casperneo@uchicago.edu>2022-02-15 11:48:42 -0500
committerGitHub <noreply@github.com>2022-02-15 11:48:42 -0500
commit615616cb5549a34bdf288c04bc1b94bd7a65c396 (patch)
tree3470bd68638e0efd6ffa91a350f1da98a9f4c3f0 /scripts
parent3413c33004ad9a568e2c7c9ae82954f5fa3798c5 (diff)
downloadflatbuffers-615616cb5549a34bdf288c04bc1b94bd7a65c396.tar.gz
flatbuffers-615616cb5549a34bdf288c04bc1b94bd7a65c396.tar.bz2
flatbuffers-615616cb5549a34bdf288c04bc1b94bd7a65c396.zip
Change Rust generated file defaults (#7101)
* Change Rust generated file defaults After #6731, flatc changed its default behavior for generating rust code to fix some importing issues. This was a breaking change which invlidated the patch release, `flatc 2.0.5` (#7081). This PR reverses the default so we can release a patch update. However, does break Rust users who work at HEAD. * Bump flatc patch version (2.0.6) Co-authored-by: Casper Neo <cneo@google.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate_code.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/generate_code.py b/scripts/generate_code.py
index 48d317e6..9871c0df 100755
--- a/scripts/generate_code.py
+++ b/scripts/generate_code.py
@@ -125,12 +125,13 @@ CPP_17_OPTS = NO_INCL_OPTS + [
"--cpp-static-reflection",
"--gen-object-api",
]
-RUST_OPTS = BASE_OPTS + ["--rust", "--gen-all", "--gen-name-strings"]
+RUST_OPTS = BASE_OPTS + ["--rust", "--gen-all", "--gen-name-strings", "--rust-module-root-file"]
RUST_SERIALIZE_OPTS = BASE_OPTS + [
"--rust",
"--gen-all",
"--gen-name-strings",
"--rust-serialize",
+ "--rust-module-root-file",
]
TS_OPTS = ["--ts", "--gen-name-strings"]
LOBSTER_OPTS = ["--lobster"]
@@ -449,4 +450,4 @@ if not args.skip_gen_reflection:
"reflection_generated.h")
# Python Reflection
-flatc_reflection(["-p"], "python/flatbuffers", "reflection") \ No newline at end of file
+flatc_reflection(["-p"], "python/flatbuffers", "reflection")