Make --bfbs-filenames default to location of first schema file. (#6705)

* Make --bfbs-filenames default to location of first schema file.

Make RelativeToProjectRoot always work, applying "../" where needed. This is
needed for backwards compatibility. The first input file may be deeper in some
directory than the other files. Now, there will always be a declaration
file.

* documentation

* clang format

Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
Casper
2021-06-22 10:19:46 -04:00
committed by GitHub
parent c8db1ca5d4
commit 71d43f3be9
4 changed files with 34 additions and 19 deletions

View File

@@ -13,6 +13,9 @@ There are some quirks:
field of `Schema`. These mark the presence of new, backwards incompatible,
schema features. Code generators must error if generating a schema with
unrecognized advanced features.
- Filenames are relative to a "project root" denoted by "//" in the path. This
may be specified in flatc with `--bfbs-filenames=$PROJECT_ROOT`, or it will be
inferred to be the directory containing the first provided schema file.
## Invocation