-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
devider: add aarch64/arm64 builds #51370
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe pull request includes modifications to three files: The In Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This is weird!
@aliciaaevans Any ideas ? |
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
3d5d993
to
17c8237
Compare
There was a problem hiding this 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
🧹 Outside diff range and nitpick comments (2)
recipes/devider/build.sh (2)
6-6
: Consider separating declaration and assignment of CARGO_HOMEThe current line sets the CARGO_HOME environment variable, which is necessary for the conda-build environment. However, to address the static analysis hint and improve robustness, consider separating the declaration and assignment:
-export CARGO_HOME="$(pwd)/.cargo" +CARGO_HOME="$(pwd)/.cargo" +export CARGO_HOMEThis approach:
- Avoids masking the return value of the command substitution.
- Makes it easier to handle potential errors in the command substitution.
- Improves readability and follows shell scripting best practices.
🧰 Tools
🪛 Shellcheck
[warning] 6-6: Declare and assign separately to avoid masking return values.
(SC2155)
11-18
: Excellent addition of architecture-specific build optionsThe new case statement for setting architecture-specific features is a great improvement:
- It allows for optimized builds on ARM architectures by enabling the NEON feature.
- The structure is clean and easily extensible for future architecture-specific needs.
Suggestion for minor improvement:
Consider using a more specific default case to catch unexpected architectures:case $(uname -m) in aarch64 | arm64) FEATURES="--features neon --no-default-features" ;; - *) + x86_64 | i686) FEATURES="" ;; + *) + echo "Unsupported architecture: $(uname -m)" >&2 + exit 1 + ;; esacThis change would provide clearer error messages if the script is run on an unexpected architecture.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
- recipes/devider/build.sh (1 hunks)
- recipes/devider/devider-aarch64.patch (1 hunks)
- recipes/devider/meta.yaml (3 hunks)
✅ Files skipped from review due to trivial changes (1)
- recipes/devider/devider-aarch64.patch
🧰 Additional context used
🪛 Shellcheck
recipes/devider/build.sh
[warning] 6-6: Declare and assign separately to avoid masking return values.
(SC2155)
🔇 Additional comments (7)
recipes/devider/build.sh (3)
1-3
: Improved error handling and debugging setupThe changes to the shebang line and the addition of the
set -xeuo
command are good improvements:
- Simplifying the shebang line makes the script more portable.
- Using
set -xeuo
enables better error handling and debugging:
-x
: Prints commands and their arguments as they are executed.-e
: Exits immediately if a command exits with a non-zero status.-u
: Treats unset variables as an error when substituting.-o pipefail
: Causes a pipeline to fail if any command fails.These changes will make the build process more robust and easier to debug.
20-20
: Proper integration of architecture-specific featuresThe addition of
${FEATURES}
to the cargo install command is excellent:
- It correctly applies the architecture-specific build options set earlier.
- This change ensures that the NEON features are used when building on ARM architectures, potentially improving performance.
- The placement of
${FEATURES}
at the end of the command allows it to override any default features if necessary.This modification completes the architecture-specific build improvements started earlier in the script.
1-21
: Overall excellent improvements to the build scriptThe changes made to this build script are well-thought-out and beneficial:
- Improved error handling and debugging with the
set -xeuo pipefail
command.- Proper setting of the CARGO_HOME environment variable for conda-build compatibility.
- Addition of architecture-specific build options, particularly for ARM architectures.
- Correct integration of these options into the cargo install command.
These modifications will make the build process more robust, easier to debug, and optimized for different architectures. The script is now more maintainable and extensible for future needs.
Consider implementing the minor suggestions provided in the previous comments to further enhance the script's robustness and clarity.
🧰 Tools
🪛 Shellcheck
[warning] 6-6: Declare and assign separately to avoid masking return values.
(SC2155)
recipes/devider/meta.yaml (4)
14-14
: LGTM! Build number increment is appropriate.Incrementing the build number from 0 to 1 is correct when making changes to the package without changing its version. This aligns with the addition of aarch64 support.
Line range hint
1-54
: Overall, the changes look good and align with the PR objectives.The modifications to
meta.yaml
effectively add support for aarch64/arm64 builds as intended. The key changes include:
- Adding an architecture-specific patch
- Incrementing the build number
- Adding a new host requirement for clangdev
- Specifying additional platforms (linux-aarch64 and osx-arm64)
These changes are consistent and necessary for supporting the new architectures. However, please ensure that all verifications suggested in the previous comments are performed to guarantee full compatibility and build support for the new platforms.
50-52
: LGTM! Verify build support for new platforms.The addition of linux-aarch64 and osx-arm64 to the additional-platforms list is appropriate and aligns with the PR objective.
Please ensure that the necessary build infrastructure and dependencies are in place to support these new platforms. You can verify the availability of key dependencies for these platforms with:
#!/bin/bash # Description: Check availability of key dependencies for aarch64 and arm64 for dep in rust clangdev samtools minimap2 lofreq tabix pysam; do echo "Checking $dep for linux-aarch64:" conda search -c conda-forge -c bioconda --platform linux-aarch64 $dep echo "Checking $dep for osx-arm64:" conda search -c conda-forge -c bioconda --platform osx-arm64 $dep echo "---" done
25-26
: LGTM! Verify clangdev version constraint.The addition of clangdev as a host requirement for linux and aarch64 is appropriate for supporting the new architecture.
Please confirm that the specific version constraint (>=16,<17) for clangdev is necessary. If it's not critical, consider relaxing it to allow for a wider range of compatible versions. You can check the availability of clangdev versions in the conda-forge channel with:
patches: | ||
- devider-aarch64.patch # [aarch64] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Patch File Does Not Address aarch64-Specific Changes
The devider-aarch64.patch
only updates dependency versions and does not include any modifications specific to aarch64 architecture support.
- Ensure that the patch includes necessary aarch64-specific configurations or code changes.
🔗 Analysis chain
LGTM! Verify the patch file contents.
The addition of the architecture-specific patch for aarch64 is appropriate. This is a common approach for supporting new architectures.
Please ensure that the devider-aarch64.patch
file contains the necessary changes for aarch64 support. You can verify its contents with:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Display the contents of the aarch64 patch file
cat recipes/devider/devider-aarch64.patch
Length of output: 560
@BiocondaBot please fetch artifacts |
Package(s) built are ready for inspection:
Docker image(s) built:
|
LGTM! |
@BiocondaBot please add label |
@martin-g I think there are some circumstances where conda-build will try to build packages which are dependencies instead of throwing an error. I am not sure of the details. You probably can add the osx-arm64 for lofreq first in another PR and then re-enable it here. |
Describe your pull request here
Please read the guidelines for Bioconda recipes before opening a pull request (PR).
General instructions
@BiocondaBot please add label
command.@bioconda/core
in a comment.Instructions for avoiding API, ABI, and CLI breakage issues
Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify
run_exports
(see here for the rationale and comprehensive explanation).Add a
run_exports
section like this:with
...
being one of:{{ pin_subpackage("myrecipe", max_pin="x") }}
{{ pin_subpackage("myrecipe", max_pin="x.x") }}
{{ pin_subpackage("myrecipe", max_pin="x.x") }}
(in such a case, please add a note that shortly mentions your evidence for that){{ pin_subpackage("myrecipe", max_pin="x.x.x") }}
(in such a case, please add a note that shortly mentions your evidence for that){{ pin_subpackage("myrecipe", max_pin=None) }}
while replacing
"myrecipe"
with eithername
if aname|lower
variable is defined in your recipe or with the lowercase name of the package in quotes.Bot commands for PR management
Please use the following BiocondaBot commands:
Everyone has access to the following BiocondaBot commands, which can be given in a comment:
@BiocondaBot please update
@BiocondaBot please add label
please review & merge
label.@BiocondaBot please fetch artifacts
You can use this to test packages locally.
Note that the
@BiocondaBot please merge
command is now depreciated. Please just squash and merge instead.Also, the bot watches for comments from non-members that include
@bioconda/<team>
and will automatically re-post them to notify the addressed<team>
.