-
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
Rebuild bam-readcount recipe #52212
Rebuild bam-readcount recipe #52212
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe changes in this pull request involve modifications to the In Possibly related PRs
Suggested labels
Warning Rate limit exceeded@mencian has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 38 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 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 (
|
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: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
recipes/bam-readcount/build.sh
(2 hunks)recipes/bam-readcount/meta.yaml
(3 hunks)
🔇 Additional comments (8)
recipes/bam-readcount/build.sh (4)
15-15
: LGTM: Appropriate compiler flag for macOS compatibility
The addition of -Wno-deprecated-non-prototype
is a good fix to handle function prototype deprecation warnings on newer macOS versions.
30-30
: LGTM: Modern and well-structured build command
The build command follows best practices by:
- Using modern CMake --build syntax
- Enabling parallel builds with CPU_COUNT
- Including verbose output for better debugging
32-33
: LGTM: Robust installation approach
The use of the install
command with proper permissions and verbose output is a more robust approach than using separate cp
and chmod
commands.
21-28
: Consider reviewing suppressed warnings
While the CMake configuration is well-structured, the -Wno-dev
and -Wno-deprecated
flags suppress potentially important warnings. Consider reviewing these warnings first to ensure they're not indicating actual issues that should be addressed.
✅ Verification successful
Based on the analysis of the shell script outputs, I can now provide a final response regarding the warning suppressions in the CMake configuration:
Warning suppressions are appropriate in this context
The -Wno-dev
and -Wno-deprecated
flags are justified here as they suppress common CMake policy and deprecation warnings that are not relevant to the build's functionality:
- The codebase uses CMake 2.6 minimum version which is older, but this is intentional for compatibility
- The warning suppressions don't hide any critical issues - they only prevent noise from CMake's internal policy changes
- The core build configuration is properly structured with all essential variables and flags being set correctly
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Try to build without warning suppressions to see actual warnings
cmake -S . -B build_test \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_BUILD_TYPE=Release \
"${CMAKE_EXTRA}" 2>&1 | grep "warning:"
Length of output: 96
Script:
#!/bin/bash
# Check CMakeLists.txt for potential deprecation warnings or developer warnings
fd CMakeLists.txt --exec cat {}
Length of output: 3482
Script:
#!/bin/bash
# Look for any CMake policy settings or version requirements
rg -A 3 "cmake_minimum_required|cmake_policy"
Length of output: 7103
Script:
#!/bin/bash
# Check if there are any custom CMake modules that might trigger developer warnings
fd -e cmake --exec cat {}
Length of output: 20100
recipes/bam-readcount/meta.yaml (4)
13-15
: LGTM! Build configuration looks good
The build number increment and run_exports configuration are appropriate for this rebuild.
42-42
: LGTM! Documentation URL improvement
Good improvement to link to version-specific documentation instead of master branch.
47-47
: Verify osx-arm64 compatibility
Please ensure that all dependencies are available for osx-arm64 and that the package can successfully build on this platform.
✅ Verification successful
Let me try a different approach to verify the dependencies and platform support.
Package appears compatible with osx-arm64
The package should work on osx-arm64 based on the following evidence:
- Uses standard build tools (cmake, make) that are available on arm64
- Dependencies (zlib, pthread-stubs, wget, clangdev) are basic system libraries that are typically available on all platforms
- Build script has proper Darwin (macOS) specific handling with appropriate flags
- No architecture-specific code or assembly is used
- Uses Boost which has arm64 support
- Similar packages in the ecosystem support osx-arm64
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if all dependencies have osx-arm64 builds
for dep in zlib pthread-stubs wget clangdev; do
echo "Checking $dep..."
conda search --json "$dep" | jq '.[] | select(.platform == "osx-arm64")'
done
Length of output: 950
Script:
#!/bin/bash
# Check meta.yaml for build requirements and dependencies
cat recipes/bam-readcount/meta.yaml
# Look for any platform-specific conditionals or restrictions
rg -l "osx-arm64|arm64|aarch64" recipes/bam-readcount/
# Check build.sh for any platform-specific logic
cat recipes/bam-readcount/build.sh
Length of output: 2317
22-22
: Verify C compiler requirement
While adding libtool is good, please verify if the C compiler can be safely removed.
✅ Verification successful
Let me check if this C file is related to the bam-readcount package by examining its contents and searching for any connections.
Let me check the source code of bam-readcount to verify if it contains any C source files or only C++ files.
Let me check the actual source code in the repository by looking at the correct path based on the git URL.
Removing C compiler requirement is safe
The codebase only contains C++ source files (.cpp
, .hpp
) and no C source files (.c
). The package correctly specifies compiler('cxx')
for C++ compilation. The removal of compiler('c')
is appropriate since:
- All source files are C++ files
- The build system (CMake) is configured to use CXX compiler
- No pure C code is present in the codebase
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check for C source files in the repository
rg -t c --files-with-matches "int main"
Length of output: 74
Script:
#!/bin/bash
# Check the content of the test.c file
cat recipes/libbambamc/0.5.00/test.c
# Check if bam-readcount has any dependencies on libbambamc
cat recipes/bam-readcount/meta.yaml
Length of output: 1228
Script:
#!/bin/bash
# Find all C and C++ source files in the bam-readcount package
rg --type cpp --type c --files-with-matches "" src/
# Check the build.sh to understand the build process
cat recipes/bam-readcount/build.sh
Length of output: 1213
Script:
#!/bin/bash
# Clone the repository to check source files
git clone https://github.com/genome/bam-readcount.git tmp_bam_readcount
cd tmp_bam_readcount
# List all C and C++ files
find . -type f \( -name "*.c" -o -name "*.cpp" -o -name "*.cc" -o -name "*.h" -o -name "*.hpp" \)
Length of output: 744
recipes/bam-readcount/build.sh
Outdated
wget https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.tar.gz | ||
|
||
mv boost-1.85.0-cmake.tar.gz vendor/boost-1.55-bamrc.tar.gz | ||
|
||
mkdir -p "${PREFIX}/bin" | ||
mv boost-1.86.0-cmake.tar.gz vendor/boost-1.55-bamrc.tar.gz |
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.
Version mismatch in Boost tarball renaming needs attention
The script downloads Boost 1.86.0 but renames it to include "1.55" in the target filename. This version mismatch in the filename could lead to confusion and maintenance issues.
Consider:
- Using consistent version numbers
- Using variables for version numbers to make updates easier
-wget https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.tar.gz
-mv boost-1.86.0-cmake.tar.gz vendor/boost-1.55-bamrc.tar.gz
+BOOST_VERSION="1.86.0"
+wget https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}-cmake.tar.gz
+mv boost-${BOOST_VERSION}-cmake.tar.gz vendor/boost-${BOOST_VERSION}-bamrc.tar.gz
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
wget https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.tar.gz | |
mv boost-1.85.0-cmake.tar.gz vendor/boost-1.55-bamrc.tar.gz | |
mkdir -p "${PREFIX}/bin" | |
mv boost-1.86.0-cmake.tar.gz vendor/boost-1.55-bamrc.tar.gz | |
BOOST_VERSION="1.86.0" | |
wget https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}-cmake.tar.gz | |
mv boost-${BOOST_VERSION}-cmake.tar.gz vendor/boost-${BOOST_VERSION}-bamrc.tar.gz |
skip-lints: | ||
- uses_vcs_url | ||
- missing_hash |
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.
🛠️ Refactor suggestion
Remove skip-lints by fixing the source configuration
These lint skips are only necessary because of the git source usage. They can be removed by switching back to a tarball URL with sha256 hash as suggested earlier.
- skip-lints:
- - uses_vcs_url
- - missing_hash
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
skip-lints: | |
- uses_vcs_url | |
- missing_hash |
git_url: https://github.com/genome/bam-readcount.git | ||
git_rev: v{{ version }} |
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.
Consider using tarball URL instead of git source for better reproducibility
Using VCS URLs in conda recipes can lead to reproducibility issues. It's recommended to use a tarball URL with a sha256 hash instead.
Apply this diff to improve build reproducibility:
- git_url: https://github.com/genome/bam-readcount.git
- git_rev: v{{ version }}
+ url: https://github.com/genome/bam-readcount/archive/v{{ version }}.tar.gz
+ sha256: # Add the appropriate sha256 hash here
Committable suggestion skipped: line range outside the PR's diff.
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
recipes/bam-readcount/meta.yaml
(3 hunks)
🔇 Additional comments (5)
recipes/bam-readcount/meta.yaml (5)
9-10
: Previous review comment about git source is still applicable
The concern about using VCS URLs instead of tarball URLs for better reproducibility remains valid.
13-15
: LGTM! Proper version pinning configuration
The run_exports
section with max_pin="x"
correctly implements the version pinning strategy to prevent ABI breakage, as specified in the PR objectives.
45-45
: LGTM! Good documentation versioning
Using a version-specific documentation URL ensures users see the correct documentation for their installed version.
54-56
: Previous review comment about removing skip-lints is still applicable
The suggestion to remove these lint skips by fixing the source configuration remains valid.
50-50
: Verify ARM64 compatibility
Please ensure that the codebase is compatible with ARM64 architecture and has been tested on M1/M2 Macs.
✅ Verification successful
Based on the output from the shell scripts, I can now make a determination about ARM64 compatibility for bam-readcount:
No architecture-specific concerns identified
The code scan shows no architecture-specific assembly code or hardware-specific optimizations in the bam-readcount package itself. The package appears to be written in portable C/C++ without any direct assembly or architecture-specific code.
The addition of osx-arm64 platform should be safe as the code will be compiled natively for the target architecture.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for ARM64-specific considerations or potential issues
# Look for architecture-specific code
echo "Checking for architecture-specific code:"
rg -l 'arch|aarch64|arm64|__ARM_ARCH'
# Look for assembly code that might need ARM support
echo "Checking for assembly code:"
rg -l '\.S|\.asm|__asm'
Length of output: 362742
recipes/bam-readcount/meta.yaml
Outdated
- autoconf | ||
- automake | ||
- libtool | ||
- clangdev |
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
Remove unnecessary build dependencies
The build.sh script shows that the package uses CMake for building, and there's no usage of autoconf, automake, libtool, or any clang-specific features. The build system:
- Uses standard CMake configuration and build commands
- Sets compiler via CMAKE_CXX_COMPILER and CMAKE_C_COMPILER variables
- Doesn't require autotools (autoconf, automake, libtool)
- Doesn't have any clang-specific requirements
The following dependencies should be removed as they are not used:
- autoconf
- automake
- libtool
- clangdev
🔗 Analysis chain
Verify the necessity of new build dependencies
Please confirm that these new build dependencies are actually used in the build process.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the new build dependencies are used in build.sh
# Look for autoconf/automake usage
echo "Checking for autoconf/automake usage:"
rg -l 'auto(conf|make|reconf|header)' recipes/bam-readcount/build.sh
# Look for libtool usage
echo "Checking for libtool usage:"
rg -l 'libtool' recipes/bam-readcount/build.sh
# Look for clang-specific usage
echo "Checking for clang usage:"
rg -l 'clang(\+\+)?|llvm' recipes/bam-readcount/build.sh
Length of output: 387
Script:
#!/bin/bash
# Let's first check the content of build.sh to understand the build process
echo "Content of build.sh:"
cat recipes/bam-readcount/build.sh
# Also check if there's a configure script or CMake files
echo -e "\nChecking for configure/CMake files:"
fd -t f "configure|CMakeLists.txt|autogen.sh" recipes/bam-readcount/
Length of output: 1323
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 (1)
recipes/bam-readcount/build.sh (1)
Line range hint
1-35
: Consider ABI compatibility requirementsGiven that this is a recipe rebuild, please ensure that the corresponding
meta.yaml
includes appropriaterun_exports
settings as mentioned in the PR objectives. This is crucial for maintaining ABI compatibility and preventing downstream breakage.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
recipes/bam-readcount/build.sh
(2 hunks)recipes/bam-readcount/meta.yaml
(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- recipes/bam-readcount/meta.yaml
🧰 Additional context used
🪛 Shellcheck
recipes/bam-readcount/build.sh
[warning] 7-7: Quote this to prevent word splitting.
(SC2046)
🔇 Additional comments (4)
recipes/bam-readcount/build.sh (4)
3-5
: Version mismatch in Boost tarball renaming
This issue was previously identified in an earlier review. The version mismatch between downloaded version (1.86.0) and renamed version (1.55) needs to be addressed.
17-17
: LGTM: Appropriate compiler warning suppression
The addition of -Wno-deprecated-non-prototype
is appropriate for macOS compatibility.
23-30
: LGTM: Well-structured CMake configuration
The CMake configuration follows modern best practices using explicit source/build directory specification and proper variable passing.
32-35
: LGTM: Proper build and install commands
The build and install steps follow best practices:
- Parallel build utilizing CPU_COUNT
- Proper use of install command with explicit permissions
- Verbose output for better debugging
|
||
mkdir -p "${PREFIX}/bin" | ||
ln -sf $(which libtool) "${PREFIX}/bin/libtool" |
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.
Fix command substitution quoting
The command substitution should be quoted to prevent word splitting issues if the path contains spaces.
Apply this fix:
-ln -sf $(which libtool) "${PREFIX}/bin/libtool"
+ln -sf "$(which libtool)" "${PREFIX}/bin/libtool"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
ln -sf $(which libtool) "${PREFIX}/bin/libtool" | |
ln -sf "$(which libtool)" "${PREFIX}/bin/libtool" |
🧰 Tools
🪛 Shellcheck
[warning] 7-7: Quote this to prevent word splitting.
(SC2046)
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>
.