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

Conversation

CrazyHZM
Copy link
Contributor

@CrazyHZM CrazyHZM commented Apr 17, 2024

protoc 3.7.1 don't support osx-aarch_64
https://repo1.maven.org/maven2/com/google/protobuf/protoc/3.7.1/

Minimum supported version is 3.17.3:
https://repo1.maven.org/maven2/com/google/protobuf/protoc/3.17.3/

Summary by CodeRabbit

  • Chores
    • Updated the protobuf library version to 3.17.3 to ensure compatibility and enhance performance.

Copy link

sofastack-cla bot commented Apr 17, 2024

Hi @CrazyHZM, welcome to SOFAStack community, Please sign Contributor License Agreement!

After you signed CLA, we will automatically sync the status of this pull request in 3 minutes.

Copy link

coderabbitai bot commented Apr 17, 2024

Walkthrough

The update involves a significant version bump for protobuf from 3.7.1 to 3.17.3 in the sofa-boot-project. This change is applied to the rpc-sofa-boot module and the sofa-boot-smoke-tests-rpc, ensuring that both components are compatible with the newer version of protobuf.

Changes

File Path Change Summary
.../rpc-sofa-boot/pom.xml
.../sofa-boot-smoke-tests-rpc/pom.xml
Updated protobuf version from 3.7.1 to 3.17.3.

🐇✨
Oh hooray, oh joy, what a splendid day,
The bits and bytes have found their way.
From 3.7.1 to 3.17.3, we hop,
Ensuring our code does not flop.
With every commit, our spirits leap,
In the land of code, where rabbits peep. 🌟📦


Recent Review Details

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 2ad93e1 and 4f0c0fa.
Files selected for processing (2)
  • sofa-boot-project/sofa-boot-core/rpc-sofa-boot/pom.xml (2 hunks)
  • sofa-boot-tests/sofa-boot-smoke-tests/sofa-boot-smoke-tests-rpc/pom.xml (2 hunks)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@HzjNeverStop HzjNeverStop left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

@@ -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

@HzjNeverStop HzjNeverStop reopened this Apr 17, 2024
@HzjNeverStop HzjNeverStop merged commit 0ac2d8f into sofastack:master Apr 22, 2024
5 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants