Check the Dart SDK range from pubspec.yaml

Open
#69 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
dart, python, yaml
Domain
cli

Research direction

Start with the RUNTIMES table in src/devready/checks/runtimes.py and the existing extractor pattern there, then read explain.py and docs/checks.md to see where a new entry goes. Write a line-based extractor for the sdk key under the top-level environment block of pubspec.yaml, ignoring sdk: flutter under dependencies. Done when a pubspec requiring >=3.0.0 <4.0.0 with Dart 2.19 yields one fail showing both versions, and pytest, ruff check and ruff format --check pass.

Written by the indexing model from the issue text.

Description

enhancement good first issue help wanted

Problem: Dart and Flutter projects declare the SDK range in pubspec.yaml:

environment:
  sdk: ">=3.0.0 <4.0.0"

dart pub get fails when the installed SDK is outside that range. DevReady does not check Dart.

Do:

  • Add a dart row to RUNTIMES in src/devready/checks/runtimes.py (exe dart, args --version, .tool-versions name dart).
  • Extractor for pubspec.yaml: line-based only (no YAML parser, zero dependencies). Find the sdk: key indented under a top-level environment: block, strip quotes, return it only if it matches SAFE_SPEC. Ignore sdk: flutter under dependencies.
  • Id project.dart.pubspec, miss = fail.
  • Add the explain.py entry, a docs/checks.md row, a CHANGELOG line, the README check list mention and unit tests (quoted/unquoted spec, sdk: flutter in dependencies is ignored, hostile line, too old).

Done when:

  • The pubspec above with Dart 2.19 installed gives one fail showing both versions.
  • A Flutter app's dependencies: flutter: sdk: flutter never counts as a version.

Out of scope: the flutter: constraint under environment (follow-up).

Done when: see the list above, plus pytest, ruff check and ruff format --check pass.

Notes:

  • Read-only: never execute project files, never echo file contents; only a validated version or spec reaches the report.
  • No network, no new runtime dependencies (Python >= 3.10 stdlib only).
  • Comment below to claim it and I will assign you.
Dominant language
Python
Stars
2
Forks
3
Avg merge
10h 51m
Merged PRs (30d)
40

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 Evalogical-Inc/devReady

All issues in Evalogical-Inc/devReady

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.