feat(indexer): add Android/Kotlin extractors#29
Closed
hossihub wants to merge 7 commits intoFreePeak:mainfrom
Closed
feat(indexer): add Android/Kotlin extractors#29hossihub wants to merge 7 commits intoFreePeak:mainfrom
hossihub wants to merge 7 commits intoFreePeak:mainfrom
Conversation
…neDispatcher, ViewModel/Repository
- Add WorkManager pattern extraction (Worker, CoroutineWorker, OneTime/PeriodicWorkRequest)
- Add coroutine dispatcher usage extraction (Dispatchers.IO/Main/Default, withContext)
- Add ViewModel/Repository relationship detection
- Enhanced JetpackNavExtractor: proper line numbers, block-aware argument assignment
- Fix greedy regex in android_hilt (.+ → [^={n]+)
- Add 7 new RelationshipType variants (HiltBindsInterface, ViewModelOwnsRepository, etc.)
linhdmn
reviewed
Apr 28, 2026
Member
linhdmn
left a comment
There was a problem hiding this comment.
MR Overview
- Title: feat(indexer): add Android/Kotlin extractors
- Author: hossihub
- Branch: dev → main
1. Logic Review
Issues Found
-
File:
src/indexer/kotlin_annotations.rs- Severity: warning
- Issue: The Kotlin annotation extractor handles
@ViewModel,@Repository,@WorkManager,@CoroutineDispatcher,@IntentServicebut implementation details for WorkManager and IntentService need verification against actual annotation patterns. - Suggestion: Add integration tests that parse real Kotlin files with these annotations to ensure correct extraction.
-
File:
instructions/agents-template.md(deleted)- Severity: info
- Issue: Removing agent instructions is fine since LeanKG is the single source of truth per CLAUDE.md.
- Suggestion: No action needed.
2. Scope Validation
✅ In Scope: src/indexer/kotlin_annotations.rs, Cargo.toml version bump
3. Impact Analysis
- New Files:
src/indexer/kotlin_annotations.rs - Modified Files:
Cargo.toml,Cargo.lock - Risk Level: medium (new feature, additive changes)
- Affected Modules: indexer module
4. Suggested Description Update
## Scope of Changes
### Files Changed
- `src/indexer/kotlin_annotations.rs` - New extractor for Kotlin annotations (ViewModel, Repository, WorkManager, CoroutineDispatcher, IntentService)
- `Cargo.toml` - Bump version to 0.16.8
- `instructions/` - Removed (LeanKG provides this context)
### Impact Analysis
- **Affected Modules:** indexer
- **Risk Level:** medium
- **New Dependencies:** None…e annotation patterns - Add test_extract_hilt_worker_annotations: verifies @HiltWorker and @AssistedInject extracted from CoroutineWorker subclass primary constructor - Add test_extract_intent_service_annotations: verifies @androidentrypoint extracted from IntentService subclass - Add test_extract_workmanager_assisted_params: verifies @assisted on constructor params Fix: extend visit_node to collect annotations on primary_constructor and its parameters — these were silently dropped because primary_constructor had no target_type match.
Member
|
Merged - commits are in main |
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