Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

spago publish reports used test dependencies as unused when setting pedanticPackages

Aperta
#1,428 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

@thomashoneyman ci sta già lavorando.

Dal 17/10/2026.

  • #1429 di @thomashoneyman — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Ambito
build-system

Direzione di ricerca

Start by tracing the publish path where hasTests is set to false and how package.test.pedanticPackages is checked; the issue does not name specific files or tests. Reproduce with the listed commands on the v6.0.1 tag of purescript-unsafe-coerce. Done when publishing checks production dependencies without flagging the excluded test dependencies, while normal builds and tests still check both.

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

Descrizione

I found this while releasing unsafe-coerce with Spago 1.0.5 — that library has no production dependencies, but its tests use console, effect, and prelude, with package.test.pedanticPackages: true. Both spago build and spago test pass, but spago publish fails:

Tests for package 'unsafe-coerce' declare unused dependencies - please remove them from the project config:
  - console
  - effect
  - prelude

You can reproduce this from the v6.0.1 tag of purescript/purescript-unsafe-coerce, using Spago 1.0.5:

npm install
npx spago build
npx spago test
npx spago publish --offline

Publishing excludes test sources by setting hasTests to false, but the build still checks test dependencies because package.test.pedanticPackages is enabled. With no test imports in the source graph, it then incorrectly reports every test dependency as unused. Instead, IMO publishing should check production dependencies without checking dependencies of tests it deliberately excluded. Normal builds and tests should continue checking both.

Lingua principale
PureScript
Stelle
830
Fork
138
Merge medio
6h 21m
PR unite (30g)
4

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 purescript/spago

Tutte le issue di purescript/spago

Issue simili

Altre issue su Build System

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.