feat: add 9 new package parsers and refactor PackageParser trait#39
Merged
feat: add 9 new package parsers and refactor PackageParser trait#39
Conversation
…parsers Add six new package manifest parsers with full test coverage: - Conan (conanfile.py, conanfile.txt, conan.lock) - Bower (bower.json) - AboutCode (.ABOUT files) - Chef (metadata.json, metadata.rb) - FreeBSD (+COMPACT_MANIFEST) - Autotools (configure, configure.ac) Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add parsers for Perl CPAN ecosystem with three format handlers: - META.json (v2 spec) - META.yml (v1.4 spec) - MANIFEST (file listing with package name extraction) Includes improvement documentation for beyond-parity features. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add Starlark-based build file parsers using rustpython_parser: - BazelBuildParser: extracts from BUILD files, supports multiple packages - BuckBuildParser: extracts from BUCK files, supports multiple packages - BuckMetadataBzlParser: extracts from METADATA.bzl with package_url support Both Bazel and Buck parsers share the Starlark parsing approach for extracting build rule metadata (name, licenses, dependencies). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Add next phase planning document - Update SUPPORTED_FORMATS.md with newly added parsers - Update archived implementation plan with Phase 0.9 progress Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…packages method Replace the dual-method PackageParser trait API with a single required method: Before: - extract_package_data(path) -> PackageData (required, single package) - extract_all_packages(path) -> Vec<PackageData> (optional, multi-package) After: - extract_packages(path) -> Vec<PackageData> (required, all packages) - extract_first_package(path) -> PackageData (default impl, convenience) This eliminates the confusing distinction between single and multi-package parsers. All parsers now implement extract_packages() returning a Vec, and extract_first_package() is a default trait method that returns the first element. Changes across 75 files: - mod.rs: updated trait definition, macro-generated dispatch, and registered all new parsers from previous commits - 40 parser implementations: renamed method + wrapped returns in vec![] - 50+ test files: updated call sites to use extract_first_package() - Doc comments and test function names updated to reflect new API Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PackageParsertrait to consolidateextract_package_data()andextract_all_packages()into a singleextract_packages()method returningVec<PackageData>New Parsers
All parsers include comprehensive test coverage and testdata fixtures.
PackageParser Trait Refactoring
The trait previously had a confusing dual-method API:
extract_package_data()— required, returned singlePackageDataextract_all_packages()— optional, returnedVec<PackageData>This created an awkward pattern where multi-package parsers (Bazel, Buck, Debian) had to implement both methods with one delegating to the other.
New API:
extract_packages()— required, returnsVec<PackageData>(all packages)extract_first_package()— default impl, returns first package (convenience for tests)Changes span 75 files but are mechanical: rename trait method, wrap single returns in
vec![], update all call sites.Commits