Check the Dart SDK range from pubspec.yaml

Aperta
#69 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
dart, python, yaml
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Python
Stelle
2
Fork
3
Merge medio
10h 51m
PR unite (30g)
40

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Evalogical-Inc/devReady

Tutte le issue di Evalogical-Inc/devReady

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.