-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a script that can rewrite the protobuf files with a namespace prefix, such as arrow.substrait. When public libraries generate their own internal bindings and don't do this, users of said libraries can get nasty surprises from the protobuf library (segfaults, incomprehensible exceptions, or just wrong behavior) if there is even the slightest difference between different instances of the substrait namespace, even if those differences are otherwise just non-breaking changes.
- Loading branch information
1 parent
7f272f1
commit 886adf5
Showing
4 changed files
with
434 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
ignore = E203, E266, E501, W503, F403, F401 | ||
max-line-length = 88 | ||
select = B,C,E,F,W,T4,B9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,29 @@ jobs: | |
with: | ||
node-version: "16" | ||
- run: ./ci/release/dry_run.sh | ||
python-style: | ||
name: Style-check and lint Python files | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: python3 -m pip install --upgrade pip black==22.3.0 flake8==4.0.1 | ||
- name: Black | ||
run: python3 -m black --diff --check . | ||
- name: Flake8 | ||
run: python3 -m flake8 . | ||
check-proto-prefix: | ||
name: Check proto-prefix.py | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: bufbuild/[email protected] | ||
- name: Run proto-prefix.py | ||
run: tools/proto_prefix.py output test proto go_package=github.com/test/proto | ||
- name: Modify buf config to build rewritten proto files | ||
run: | | ||
echo "version: v1" > buf.work.yaml | ||
echo "directories:" >> buf.work.yaml | ||
echo " - output" >> buf.work.yaml | ||
- name: Compile rewritten proto files | ||
run: buf generate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.