You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/03/24 09:56:23 UTC

[GitHub] [arrow-rs] alamb commented on a diff in pull request #3927: Move protoc generation to binary crate, unpin prost/tonic build (#3876)

alamb commented on code in PR #3927:
URL: https://github.com/apache/arrow-rs/pull/3927#discussion_r1147340880


##########
arrow-flight/CONTRIBUTING.md:
##########
@@ -0,0 +1,31 @@
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+## Flight
+
+The prost code was generated by running this command from the root of the crate:
+
+```bash
+./regen.sh
+```
+
+The above script will run the Rust binary located in [gen](./gen)

Review Comment:
   I think it would be useful to put a note here on the context of why this doesn't use the standard protoc process (i.e. so that the code can be vendored and not automatically change if people have different versions of protoc)
   
   It might be helpful to explicitly note that now any changes to protobuf files will require running these scripts manually



##########
arrow-flight/gen/Cargo.toml:
##########
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[package]

Review Comment:
   It might be worth pointing out here that this crate is not meant to be distributed 



##########
.github/workflows/arrow_flight.yml:
##########
@@ -62,6 +61,18 @@ jobs:
       - name: Test --examples
         run: |
           cargo test -p arrow-flight  --features=flight-sql-experimental,tls --examples
+
+  vendor:
+    name: Verify Vendored Code
+    runs-on: ubuntu-latest
+    container:
+      image: amd64/rust
+    steps:
+      - uses: actions/checkout@v3
+      - name: Setup Rust toolchain
+        uses: ./.github/actions/setup-builder
+      - name: Run gen
+        run: ./arrow-flight/regen.sh
       - name: Verify workspace clean

Review Comment:
   ```suggestion
         - name: Verify workspace clean (if this fails, run ./arrow-flight/regen.sh and check in results)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org