server: hatch build hook only watches package.json — wheel builds ship a stale frontend after source-only edits
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, python, typescript
- Área
- build-system, devtools
Línea de trabajo
Start by reading src/profiles/web/build_hook.py and build.py, then compare how each build path decides whether to rebuild, installs dependencies, and reports failures. The issue points to the relevant functions and proposed fixes. Done means source or lockfile edits trigger fresh wheel assets, both paths handle npm consistently, and hook failures show useful error output.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The packaging staleness check ignores every frontend source file:
# src/profiles/web/build_hook.py:17-28
def _needs_rebuild(web_dir: Path, marker_file: Path) -> bool:
if not marker_file.exists():
return True
package_json = web_dir / "package.json"
…
return package_mtime > marker_mtime
Editing any .ts/.tsx/.css source after the last build and running hatch build / pip install . skips the rebuild entirely and packages the committed dist/ (possibly stale).
Related divergence between the two build paths (DRY violation per AGENTS.md):
build.py:141-149deliberately runsnpm install("Use npm install instead of npm ci to handle lock file sync issues") — which can silently mutatepackage-lock.jsonduring a "build" — while the hook runsnpm ci.build.pyalso doesn't watchpackage-lock.jsonfor staleness.build_hook._run_npm_buildusescapture_output=Trueand on failure prints onlyERROR: npm build failed: {e}(build_hook.py:74-76) —e.stdout/e.stderrare discarded, so a failed packaging build gives no reason.
Suggested fix
- Extract a shared
needs_rebuild()intoweb/build.py(scanning package.json + lock +**/*.{ts,tsx,css,html}) and havebuild_hookimport it — or simply always runnpm run buildin the hook when npm is available. - Standardize on
npm ci --no-audit --no-fundin both (escape-hatch flag for lock drift in build.py). - Print
e.stderr(tail) on hook failure.
- Lenguaje dominante
- Python
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 4 h 46 min
- PR fusionados (30 d)
- 55
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de falbany/ProFiles
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
falbany/ProFiles#187 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Web UI: config handoff from a second launch leaves the open YAML editor showing stale contentAbiertobug frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
bug frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de falbany/ProFiles
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
ip-tools/patzilla#219 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
EPSSClient commits to its SQLite cache once per score: a 100-CVE bulk fetch makes 101 disk flushesAbiertopriority:p3 technical-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
jimmy058910/jmo-security-repo#1673 ·
Los mantenedores suelen responder en 1 día
-
enhancement ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
-
integration: frontier_silicon
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
home-assistant/core#193176 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
task create and task update take --body-file and --stdinPosiblemente ocupada @JuanBarriosS la tomó hoy. Abiertocli enhancement good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
pyrite-wiki/pyrite#1687 · 1 comentario ·
Los mantenedores suelen responder en 1 día