BabLoRP: Multi-language support#81
Conversation
… them to DependencyGraphBuilder
…es that has a fits the parser language mpping
mircealungu
left a comment
There was a problem hiding this comment.
PR Review: Multi-language support
This is a substantial piece of work with clean architecture (Domain/Application/Infra layers, factory patterns, value objects like RelativePath). ~3,400 lines of tests, good test infrastructure, and solid documentation additions. That said, there are several issues that should be addressed before merging.
Blocking Issues
1. Binary/compiled files committed to the repo
~18 .dll files, a .pdb, Archlens.deps.json, and a binary snapshot are committed under src/python/src/.dotnet/. These are build artifacts that permanently bloat the repo. They should be removed and users should build locally via dotnet publish.
2. Fork-specific references left in
archlens.jsonpoints toBabLoRP/ArchLensinstead ofarchlens/ArchLens.github/workflows/build.ymlhard-codes SonarQube org as"bablorp"and project key"BabLoRP_ArchLens"config.schema.json's$schemaURL points to the fork
3. Shell injection risk in cli_interface.py
Lines constructing PowerShell commands use string interpolation from config values + shell=True. A malicious archlens.json with shell metacharacters in project/view names could be exploited. Also, powershell calls are Windows-only and will fail on Linux/macOS.
4. pythonnet loading at import time
load("coreclr") runs unconditionally when cli_interface.py is imported. If .NET runtime isn't installed, the entire CLI breaks — even for Python-only projects.
Bugs
UpdateGraphUseCase: Fetches the remote snapshot twice in diff mode. The second call should reusesnapshotGraph.DependencyGraphBuilder.TryClassifyItem:async Taskmethod called withoutawait(suppressed via#pragma). Exceptions are silently swallowed.ConfigManager.MapBaseOptions: UsesbaseDir.Split("\\")— Windows-only. Should usePath.GetFileName(baseDir).ProjectDependencyGraph.RemoveDependency: Returnstrueeven when the target was not found indeps.should_run_dotnet(): Logicnot (len(...) > 1)means multi-language projects (e.g.,.cs+.go) fall through to the Python parser, which doesn't support them — defeating the purpose of multi-language support.GitSnapshotManager.GetLastSavedDependencyGraphAsync: Returnsnullbut signature is non-nullableTask<ProjectDependencyGraph>.- Go/Java/Kotlin parsers:
StreamReadernot inusingblocks — file handle leaks on exceptions. JavaDependencyParser: Regex recompiled on every source line (unlike Kotlin parser which does it correctly).GitSnapshotManager.BuildRawUrl: Branch name is not URL-encoded, breaking for branches likefeature/foo.
Typos
"snaphot"in config schema (should be"snapshot")"completeViewDetph2"inarchlens.json(should be"completeViewDepth2")- Deserialize error message says
"serialise"instead of"deserialise" - README: "also have a dedicted" → "also has a dedicated", "reccommend" → "recommend"
- CONTRIBUTING.md: "is build after" → "is built after"
CI Concerns
- Lint job does
git add -Aand auto-pushes — could accidentally stage sensitive files. Should use specific file globs. lintandbuildjobs run in parallel, sobuildmay test stale code if lint pushes a commit.- No Python tests in CI.
Known-Broken Tests Shipped
Several tests are committed with documented failures:
- Case-insensitive exclusion matching (
BIN/bin,.DEV.CS) ExcludedSnapshotItems_ShouldNotBeReportedAsDeleted_ButCurrentlyWillBe— the test name itself admits the bug
What's Done Well
- Clean architecture with proper Domain/Application/Infra separation
RelativePathvalue object prevents string path confusion- MessagePack + Lz4 for snapshot serialization — compact and fast
- Good test infrastructure (
TestFileSystem,TestHttpHandler, parser spies) - ~3,400 lines of tests covering parsers, renderers, change detection, graph building
RenderGraphintermediate representation cleanly decouples domain from rendering- Source-generated regex in
PlantUMLRenderer - Solid CONTRIBUTING.md and PR template additions
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Closes #82 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Version bump for multi-language support release (PR #81) - Add pytest, build, twine to dev-requirements.txt - Remove pytest from requirements.txt (it's a dev dependency) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Research project & thesis by @BabetteB & @lottejd