Swift: merge codegen and cppcodegen

Python code was simplified, and now a `--generate` option can be used
to drive what can be generated.

The extractor pack creation now will use an internally generated
dbscheme. This should be the same as the checked in one, but doing so
allows `bazel run create-extractor-pack` and `bazel run codegen` to be
run independently from one another, while previously the former had to
follow the latter in case of a schema change. This is the change that
triggered the above simplification, as in order for the two dbscheme
files to be identical, the first `// generated` line had to state the
same generator script.
This commit is contained in:
Paolo Tranquilli
2022-06-01 09:47:45 +02:00
parent 4b2b6fae88
commit 77f7fe8dbc
13 changed files with 70 additions and 149 deletions

View File

@@ -25,7 +25,7 @@ jobs:
git diff --exit-code --stat HEAD
- name: Generate C++ files
run: |
bazel run //swift/codegen:cppcodegen -- --cpp-output=$PWD/swift-generated-headers
bazel run //swift/codegen:codegen -- --generate=trap,cpp --cpp-output=$PWD/swift-generated-headers
- uses: actions/upload-artifact@v3
with:
name: swift-generated-headers