Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mac M1(osx-aarch_64) compile and test #1305

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sofa-boot-project/sofa-boot-core/rpc-sofa-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<properties>
<main.user.dir>${basedir}/../../..</main.user.dir>
<sofa.rpc.compiler.version>0.0.3</sofa.rpc.compiler.version>
<protobuf.protoc.version>3.17.3</protobuf.protoc.version>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

Review Summary

The task was to verify the compatibility of the updated protobuf.protoc.version to 3.17.3 in the context of the entire project, particularly checking how it aligns with the ${protobuf.version} used in the sofaboot-dependencies pom.xml.

Analysis of Shell Script Output

The executed script successfully located the definition of ${protobuf.version} in the sofaboot-dependencies pom.xml. The output reveals that ${protobuf.version} is set to 3.22.2. This version is used as a dependency version for protobuf-related artifacts within the project.

Conclusion

The protobuf.protoc.version has been updated to 3.17.3 in the rpc-sofa-boot module, while the protobuf.version used across the project in the BOM is 3.22.2. This discrepancy suggests that the protobuf compiler version (protoc) and the protobuf library version used in the project are not aligned. This could potentially lead to compatibility issues, as the protobuf compiler version should ideally match the protobuf library version to ensure consistent behavior.

Action

It is recommended to align the protobuf.protoc.version with the protobuf.version used across the project to avoid potential compatibility issues. The developers should consider updating the protobuf.protoc.version to 3.22.2 to match the protobuf library version specified in the BOM.

Updated `protobuf.protoc.version` to `3.17.3` to support macOS M1 systems. However, it is recommended to align this version with the `protobuf.version` (`3.22.2`) used across the project to ensure compatibility.

Analysis chain

Updated protobuf.protoc.version to 3.17.3 to support macOS M1 systems.


Review Summary

The review comment concerns the update of the protobuf.protoc.version to 3.17.3 in the sofa-boot-core/rpc-sofa-boot/pom.xml file. The purpose of this update is to support macOS M1 systems. The review comment suggests verifying the compatibility of this updated version with other dependencies.

Analysis of Shell Script Output

The output from the executed shell script shows references to protobuf in various pom.xml files within the project:

  1. sofa-boot-tests/sofa-boot-smoke-tests/sofa-boot-smoke-tests-rpc/pom.xml - This file also uses the updated protobuf.protoc.version of 3.17.3.
  2. sofa-boot-project/sofaboot-dependencies/pom.xml - This file defines a protobuf-bom with a version placeholder ${protobuf.version} and references protobuf-java.

Conclusion

The update to protobuf.protoc.version to 3.17.3 is consistently used in another module (sofa-boot-smoke-tests-rpc). Additionally, the sofaboot-dependencies manages a Bill of Materials (BOM) for protobuf, which suggests centralized management of protobuf versions across the project. However, the exact value of ${protobuf.version} used in the BOM is not directly verified from the output.

Given that the updated version is used in multiple places and managed via a BOM, it is likely that the update is compatible with the project's dependencies. However, the exact version used in the BOM (${protobuf.version}) should be confirmed to ensure complete compatibility.

Action

To fully verify the compatibility and ensure that the ${protobuf.version} placeholder aligns with the updated 3.17.3 version, further investigation into the value of ${protobuf.version} is necessary.


Review Summary

The task was to verify the compatibility of the updated protobuf.protoc.version to 3.17.3 across the project, particularly in relation to the ${protobuf.version} placeholder used in the sofaboot-dependencies pom.xml.

Analysis of Shell Script Output

The executed script aimed to extract the value of ${protobuf.version} from the sofaboot-dependencies pom.xml. Unfortunately, the script did not produce any output, indicating that the protobuf.version property might not be defined within the <properties> section as expected, or the search parameters were not correctly set to capture the relevant data.

Conclusion

The absence of output suggests that the ${protobuf.version} might not be explicitly defined in the expected section of the pom.xml, or there could be an issue with how the search was conducted. This uncertainty prevents a definitive conclusion about the compatibility of the protobuf version across the project.

Action

Given the lack of conclusive data from the previous script, a more thorough search in the sofaboot-dependencies pom.xml is necessary to locate the definition of ${protobuf.version} or confirm its absence.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify if the updated protobuf version is compatible with other dependencies.
rg --type xml '<dependency>' -C 10 | grep 'protobuf'

Length of output: 841



Script:

#!/bin/bash
# Extract the value of ${protobuf.version} from the sofaboot-dependencies pom.xml
rg --type xml '<properties>' -A 20 sofa-boot-project/sofaboot-dependencies/pom.xml | grep 'protobuf.version'

Length of output: 108



Script:

#!/bin/bash
# Search for any occurrence of protobuf.version in the sofaboot-dependencies pom.xml
rg 'protobuf.version' sofa-boot-project/sofaboot-dependencies/pom.xml

Length of output: 176

</properties>

<dependencies>
Expand Down Expand Up @@ -152,7 +153,7 @@
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.1</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.7.1:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>com.google.protobuf:protoc:${protobuf.protoc.version}:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
<outputDirectory>build/generated/source/proto/test/java</outputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<properties>
<main.user.dir>${basedir}/../../..</main.user.dir>
<sofa.rpc.compiler.version>0.0.3</sofa.rpc.compiler.version>
<protobuf.protoc.version>3.17.3</protobuf.protoc.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -115,7 +116,7 @@
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.1</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.7.1:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>com.google.protobuf:protoc:${protobuf.protoc.version}:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
<outputDirectory>build/generated/source/proto/test/java</outputDirectory>
Expand Down
Loading