Support packaging raw symlinks from declare_symlink
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- build-system
Línea de trabajo
Empieza en pkg_files.bzl para rastrear cómo los artefactos File.is_symlink se convierten en entradas del manifiesto; después, lee build_tar.py, donde se procesan los tipos de entradas del manifiesto. La tarea estará terminada cuando los symlinks sin procesar produzcan entry_type=raw_symlink y el tar almacene el destino original del enlace en lugar de leer el archivo enlazado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Over in rules_python, declare_symlink() is used to create symlinks for efficiency and correctness reasons. Such artifacts are "raw" symlinks, that is, Bazel will keep them exactly as-is and not try to transform them, as happens when using declare_file().
Unfortunately, pkg_tar gives an error when it sees these artifacts. What happens is it thinks the file is a regular file, so tries to read it. Since its a relative symlink, it either is dangling (in the context of pkg_tar), or will read the actual file (instead of creating a symlink), neither of which is desirable behavior.
Thankfully, starting in Bazel 8, File.is_symlink can be used to detect these artifacts. This allows the manifest that pkg_tar generates, and the build_tar program that uses it, to handle them correctly.
The two basic changes are:
- When File.is_symlink is true, write a manifest entry with entry_type=raw_symlink (pkg_files.bzl)
- Modify build_tar.py to handle entry_type=raw_symlink: read os.readlink() from the src file. Then store it as a symlink. This preserves the original symlink.
I prototyped this a bit and it seems to work. I'd reference my branch, but its in a very hacky and broken state right now. The above gets the gist though
- Lenguaje dominante
- Starlark
- Estrellas
- 254
- Forks
- 225
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 3
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 bazelbuild/rules_pkg
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
bazelbuild/rules_pkg#1093 ·
Los mantenedores suelen responder en 1 día
-
Targets rely on implicit `__init__.py` creation, causing rules_python deprecation warningsPosiblemente ocupada @onnosteenbergen-samotics la tomó hace 31 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
bazelbuild/rules_pkg#1081 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
design feature-request
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
bazelbuild/rules_pkg#1080 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
bazelbuild/rules_pkg#1075 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
bazelbuild/rules_pkg#1066 · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de bazelbuild/rules_pkg
Issues similares
-
orchestration.migration.data.tasks.retry values are ignored by the 8.8 data migration jobPosiblemente ocupada @irisfield la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
camunda/camunda-platform-helm#7773 ·
Los mantenedores suelen responder en 1 día
-
0.kind: enhancement 6.topic: reproducible builds
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
NixOS/nixpkgs#580765 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
win_build: parallel PostBuildEvent race in example_app_atiopencl and example_app_nvopencl copying openclapp_kernels.clPosiblemente ocupada @qixuancao la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
area: workspace needs: repro priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[Bug]: CSS extract HMR never removes old stylesheet when the filename contains a queryPosiblemente ocupada @ebidel la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
web-infra-dev/rspack#16345 ·
Los mantenedores suelen responder en 1 día