[Bug] Coverage stack detection omits Swift, Dart, and Scala, falling through to UNKNOWN in evidence setup

Open Beginner friendly
#5,838 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@RishabhIIITD is already working on this.

Since Nov 25, 2026.

  • #6284 by @RishabhIIITD — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active

Research direction

Open packages/core/src/repowise/core/test_runners/stacks.py and read _LANGUAGE_STACKS (around lines 735-745), _BUILDERS and _manifest_stacks to see how a manifest name becomes a stack, then follow detect_repo_stacks into packages/core/src/repowise/core/evidence/setup.py. Add Swift, Dart and Scala stack definitions using the commands and report paths listed under "Done looks like", wire them into both maps, and check the fallback still returns unknown. Done is tests/unit/test_coverage_stacks.py passing with new cases for a repo containing Package.swift and one containing pubspec.yaml.

Written by the indexing model from the issue text.

Description

bug
Summary

_LANGUAGE_STACKS in packages/core/src/repowise/core/test_runners/stacks.py maps supported languages to test runner stacks (python, go, rust, jvm, dotnet, ruby, php, node).

Even though Swift (Package.swift), Dart (pubspec.yaml), and Scala (build.sbt) have full AST and graph support in REGISTRY, they are absent from _LANGUAGE_STACKS and _BUILDERS. Running repowise evidence setup in repos using these languages falls through to UNKNOWN.

packages/core/src/repowise/core/test_runners/stacks.py:735-745

_LANGUAGE_STACKS = {
    "python": "python",
    "go": "go",
    "rust": "rust",
    "java": "jvm",
    "kotlin": "jvm",
    "csharp": "dotnet",
    "ruby": "ruby",
    "php": "php",
    "javascript": "node",
    "typescript": "node",
}
Mechanism
  • In packages/core/src/repowise/core/evidence/setup.py, evidence_setup calls detect_repo_stacks to print the command that writes a coverage report.
  • detect_repo_stacks looks up the manifest filename in _manifest_stacks(name).
  • Because "swift", "dart", and "scala" are missing from _LANGUAGE_STACKS:
    • Package.swift is ignored.
    • pubspec.yaml is ignored.
    • build.sbt is ignored.
  • The repository is classified as UNKNOWN, producing "Repowise could not tell how this repository runs its tests.".
Repro

Run repowise evidence setup or detect_repo_stacks on a Swift repository containing a Package.swift and tests:

from pathlib import Path
from repowise.core.test_runners.stacks import detect_repo_stacks

stacks = detect_repo_stacks(Path("/path/to/swift/repo"))
print([s.name for s in stacks])

Output:
['unknown']

Expected: A recognized stack with swift test --enable-code-coverage.

Impact

Users and AI agents running repowise evidence setup on Swift, Dart, or Scala projects receive no automated coverage command plan despite Repowise supporting these languages.

Done looks like
  • Add stack definitions for Swift (swift test --enable-code-coverage, .build/debug/codecov/*.json), Dart (dart test --coverage=coverage, coverage/lcov.info), and Scala (sbt coverage test coverageReport, target/scala-*/scoverage-report/scoverage.xml).
  • Map them in _LANGUAGE_STACKS and _BUILDERS.
  • Retain UNKNOWN fallback for truly unrecognized ecosystems.
Tests

In tests/unit/test_coverage_stacks.py:

  • Test that a repository with Package.swift yields the swift test stack.
  • Test that a repository with pubspec.yaml yields the dart test stack.
Dominant language
Python
Stars
7.1k
Forks
756
Avg merge
21h 5m
Merged PRs (30d)
797

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from repowise-dev/repowise

All issues in repowise-dev/repowise

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.