`skip android build`: `--show-bin-path` result read from merged stdout+stderr, so a SwiftPM deprecation warning can be used as the bin path
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- android, swift
- Área
- build-system
Línea de trabajo
Lee skipstone/Sources/SkipBuild/Commands/AndroidCommand.swift alrededor de la consulta de binPathCmd y el helper captureLine de AndroidTestCommand.swift. Sigue cómo launchTool maneja stderr en las llamadas con --show-bin-path y luego ejecuta el flujo de compilación o pruebas de Android pertinente con presente el aviso de obsolescencia de SwiftPM. Se considera terminado cuando la ruta bin se obtiene de stdout y el aviso no puede hacer que la compilación use un directorio de salida no válido.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
skip android build (via the Gradle buildAndroidSwiftPackage… step) determines the .so output directory by running swift build --show-bin-path … --build-system native and taking the last non-empty line of the output. That output is read through launchTool(...), which defaults to includeStdErr: true, so stdout and stderr are merged.
SwiftPM prints a deprecation warning on stderr for --build-system native:
warning: '--build-system native' has been deprecated and will be removed in a future release; please report an issue at https://github.com/swiftlang/swift-package-manager/issues if you are unable to adopt the default build system.
When that stderr line happens to arrive after the stdout path line, lines.last is the warning sentence, Skip uses it as buildOutputFolder, and the build then fails trying to open it (NSCocoaErrorDomain Code=260, file not found). It is an ordering race: the same commit passes and fails on consecutive runs with the same warning present.
Where
skipstone/Sources/SkipBuild/Commands/AndroidCommand.swift(~L986–1016 onmain@ 1.9.21):binPathCmd→launchTool(swiftCmd, arguments:…, env:)→binPath = lines.last.skipstone/Sources/SkipBuild/Commands/AndroidTestCommand.swift:captureLine(...)is documented as "the last non-empty stdout line" but also callslaunchToolwith the defaultincludeStdErr: true; it is used for--show-bin-path(harness and--build-tests).
The --show-bin-path lookup was introduced in skiptools/skipstone#245 (swiftbuild support). The stdout/stderr output shape of --show-bin-path with --build-system native is visible in swiftlang/swift-build#1363.
Versions
- Skip 1.9.8 (Homebrew, invoked by Gradle) and 1.9.12 (Package.resolved), macOS, Skip Fuse app.
- The code is unchanged on
mainat 1.9.21 (3dfa66f).
Suggested fix
- Pass
includeStdErr: falsefor the--show-bin-pathinvocations (and incaptureLine), and/or - pick the last line that is an absolute path to an existing directory instead of
lines.last.
Workaround we use
Retry the Gradle assemble once when the log contains both Code=260 and adopt the default build system.
- Lenguaje dominante
- Swift
- Estrellas
- 3.3k
- Forks
- 115
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 skiptools/skip
-
Comments in functionsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
enhancement project
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
skiptools/skip#673 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
Los mantenedores suelen responder en 1 día
Todos los issues de skiptools/skip
Issues similares
-
Switch to new string APIAbiertofxios-coreexperience
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
mozilla-mobile/firefox-ios#36661 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
manaflow-ai/cmux#45713 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[Bug] Webseite unter iOSAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
playback
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día