-
Notifications
You must be signed in to change notification settings - Fork 0
Add Bazel support #18
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
base: main
Are you sure you want to change the base?
Conversation
Implements reusable Bazel parser that integrates with language-specific managers: - Core parser supports BUILD, MODULE.bazel, and WORKSPACE files - Smart Maven coordinate conversion (e.g., com_google_guava_guava -> com.google.guava:guava) - Integrated with Java manager following existing multi-build-tool pattern - Comprehensive test coverage for all parsing scenarios - Designed for future expansion to Python, Go, and other languages 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Features added: - Python manager integration with pip dependency parsing (@pip//package_name) - Go manager integration with external repository parsing (@com_github_org_repo//) - Smart Go module name conversion (com_github_gorilla_mux -> github.com/gorilla/mux) - Support for golang.org/x packages (org_golang_x_time -> golang.org/x/time) - Comprehensive test coverage for both Python and Go integrations - Improved code quality with switch statements instead of if-else chains 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Features added: - Comprehensive WORKSPACE file parsing for http_archive, git_repository, and maven_install - Version extraction from tags, commits, and version fields - Support for legacy Bazel dependency management patterns - Dedicated workspace dependency category for better organization - Complete test coverage for WORKSPACE parsing scenarios This provides full coverage of both modern (MODULE.bazel) and legacy (WORKSPACE) Bazel dependency management. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Features added: - Bazel build tool detection using .bazel file extensions to avoid false positives - Comprehensive integration test showing Spring Boot framework detection with Bazel build system - Test case demonstrates real-world scenario: Spring Boot app using Bazel for builds with Maven dependencies - Validates that both framework (Spring Boot) and build tool (Bazel) are correctly detected together - Shows proper Maven package manager integration alongside Bazel This completes the Bazel integration by ensuring proper detection and testing of polyglot build scenarios. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…ions for Bazel This commit completes the Bazel dependency parsing implementation with: - Enhanced Maven coordinate parsing with sophisticated heuristics for complex patterns like org_springframework_spring_core and io_grpc_grpc_netty_shaded - Known library pattern recognition for Spring Framework, Apache Commons, Jackson, gRPC, and Netty - Performance optimizations including thread-safe caching for Maven coordinate parsing results - JavaScript/npm dependency support in Bazel BUILD files - Comprehensive test coverage for all language integrations - Cache management functions for monitoring and memory cleanup The implementation now handles real-world Maven coordinate complexity while maintaining high performance through strategic caching of expensive parsing operations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Fix misleading regex comment to clarify @repo// format matching - Add capacity hint to slice allocation for better performance - Limit regex matches to 1000 to prevent excessive memory allocation - Correct comment about generic underscore replacement (dots only) - Implement proper artifact ID normalization with underscore-to-hyphen conversion - Fix code style by moving nil check before comment block 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
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.
Pull Request Overview
This PR implements comprehensive Bazel build system support, adding dependency parsing capabilities that integrate with existing language-specific dependency managers (Java, Python, Go, JavaScript). The implementation includes sophisticated Maven coordinate parsing with caching optimizations and extends the framework detection to include Bazel-based Spring Boot projects.
Key changes include:
- Added complete Bazel dependency parser with support for BUILD, WORKSPACE, and MODULE.bazel files
- Integrated Bazel parsing into existing Java, Python, Go, and JavaScript dependency managers
- Enhanced build tool detection with specific Bazel file patterns to avoid false positives
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
pkg/dep/bazel.go |
New comprehensive Bazel dependency parser with Maven coordinate parsing and caching |
pkg/dep/bazel_test.go |
Extensive test suite covering all Bazel parsing scenarios and integration tests |
pkg/dep/java.go |
Integration of Bazel dependencies into Java dependency manager |
pkg/dep/python.go |
Integration of Bazel dependencies into Python dependency manager |
pkg/dep/go.go |
Enhanced Go manager with Bazel dependency support and duplicate prevention |
pkg/dep/js.go |
JavaScript manager integration with Bazel dependency merging |
config/build_tools.yml |
Added Bazel build tool detection rule |
pkg/rules/analyze_testfs_test.go |
Test data and expectations for Spring Boot + Bazel integration |
expr.cache |
Cache file update with new Bazel file detection expression |
Implements comprehensive Bazel dependency parsing that integrates with existing dependency managers (Java, Python, Go, JavaScript) in the whatsun
project.
Key Features
Implementation Details
Test Plan
🤖 Generated with https://claude.ai/code