github-actions[bot] commented on code in PR #40508:
URL: https://github.com/apache/beam/pull/40508#discussion_r4377857616


##########
release/src/main/scripts/set_version.sh:
##########
@@ -115,4 +118,5 @@ if [[ "$GIT_ADD" == yes ]] ; then
   git add runners/google-cloud-dataflow-java/build.gradle
   git add sdks/typescript/package.json
   git add scripts/beam-sql.sh
+  git add 'sdks/rust/*Cargo.toml' sdks/rust/Cargo.lock

Review Comment:
   **🟠 High**: Using `'sdks/rust/*Cargo.toml'` in `git add` can be brittle: in 
Git pathspecs without the `:(glob)` magic signature, `*` matches slashes, but 
if any files in `sdks/rust/` match before quoting or if git treats it literally 
when no root match exists in some git versions/contexts, it can be confusing. 
More importantly, using `:(glob)sdks/rust/**/Cargo.toml` (or 
`sdks/rust/Cargo.toml 'sdks/rust/**/Cargo.toml'`) makes the recursive intent 
explicit and unambiguous.
   
   ```suggestion
     git add ':(glob)sdks/rust/**/Cargo.toml' sdks/rust/Cargo.lock
   ```



##########
local-env-setup.sh:
##########
@@ -68,6 +68,13 @@ if [ "$kernelname" = "Linux" ]; then
         exit
     fi
 
+    type -P rustc > /dev/null 2>&1
+    rustExists=$?
+    if [ $rustExists -ne 0 ]; then
+        echo "Installing rust via rustup..."
+        curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

Review Comment:
   **🟡 Medium**: `rustup` installs binaries into `~/.cargo/bin` and writes 
`~/.cargo/env`, which is not in `PATH` for the remainder of the current shell 
session or subsequent non-login commands unless sourced. Sourcing 
`$HOME/.cargo/env` (if present) or reminding the user ensures `rustc`/`cargo` 
are immediately usable.
   
   ```suggestion
           curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- 
-y && . "$HOME/.cargo/env"
   ```



##########
sdks/rust/gradle/versions.gradle:
##########
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+// Beam versions, all derived from gradle.properties (bumped by
+// release/src/main/scripts/set_version.sh), and passed to every command this 
project runs.
+//
+// beamVersion        the Gradle project version, e.g. X.Y.Z-SNAPSHOT or X.Y.Z
+// beamReleaseVersion the release it becomes, e.g. X.Y.Z; names published 
release artifacts
+// beamSdkVersion     the SDK version, e.g. X.Y.Z.dev; stamped into binaries 
and container tags
+//
+// A plain `cargo` build reads the same gradle.properties keys (see 
beam/core/build.rs), so

Review Comment:
   **🟢 Low**: This comment references `beam/core/build.rs`, which does not 
exist in this PR yet (only `beam/model` is included here).



##########
sdks/rust/Cargo.toml:
##########
@@ -0,0 +1,71 @@
+# 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.
+
+[workspace]
+resolver = "3"
+members = [
+    "beam/model",
+]
+
+[workspace.package]
+version = "2.78.0-SNAPSHOT"
+edition = "2024"
+rust-version = "1.98"

Review Comment:
   **🟡 Medium**: Please verify the `rust-version = "1.98"` MSRV requirement. 
Standard `rustup` stable toolchains (as installed by `local-env-setup.sh` or 
distro packages) must be at least this version or Cargo will fail to build the 
workspace.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to