Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Add module version metadata to binary distributions

Cerrado
#1,228 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Ya se ha fusionado un pull request relacionado.

  • #1231 de @Kyle-Ye — fusionado

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
swift

Línea de trabajo

Start with the build settings that publish OpenSwiftUI and OpenSwiftUICore, tracing how SWIFT_USER_MODULE_VERSION is set and how -user-module-version reaches the generated .swiftinterface files. Then inspect the distribution validation path for the iOS, macOS and visionOS slices, and compare it with the standalone DemoKit experiment. Done means version checks pass at and below 0.25.0, fail above it, and the docs explain _underlyingVersion and unversioned-module behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area: tooling type: build

Summary

Add module version metadata to published OpenSwiftUI binaries so consumers can check a minimum release at compile time:

#if canImport(OpenSwiftUI, _version: 0.25.0)
import OpenSwiftUI
#endif

Scope

  • Set SWIFT_USER_MODULE_VERSION from the release version for the OpenSwiftUI and OpenSwiftUICore targets.
  • Preserve -user-module-version in the public .swiftinterface files for every published platform slice.
  • Keep dependency framework versions independent of the OpenSwiftUI release version.
  • Document the use of _version and the behavior of older binaries without module version metadata.

Acceptance criteria

  • Version checks succeed for the published version and lower versions, and fail for higher versions.
  • The checks work when consumers load only the public textual interfaces on iOS, macOS, and visionOS.
  • Distribution validation checks both the expected version and an upper boundary.
  • Documentation explains that _underlyingVersion checks the underlying Clang module, and that an unversioned Swift module warns and ignores the requested version rather than selecting the false branch.

A standalone DemoKit experiment has verified the build setting, version boundaries, and public interface behavior across the five Apple SDK slices.

Lenguaje dominante
Swift
Estrellas
2.5k
Forks
84
Merge medio
4 h 55 min
PR fusionados (30 d)
73

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenSwiftUIProject/OpenSwiftUI

Todos los issues de OpenSwiftUIProject/OpenSwiftUI

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.