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

Paths are not normalized to posix format on Windows

Abierto
#578 0 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
tooling

Línea de trabajo

Reproduce el problema en Windows usando el comando protoc o la configuración buf.gen.yaml, con varios archivos dependientes y strategy: all. Lee la especificación de generación de Protobuf enlazada en el informe y compara las rutas generadas con el formato POSIX requerido; el trabajo estará terminado cuando la generación no produzca advertencias sobre rutas y el código generado sea correcto.

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

Descripción

bug investigation needed
Summary

Paths are not normalized to posix format on Windows

Reproduction Steps

Call protoc with the betterpython out options with multiple files that depend on one another.

Also happen when run through buf: (buf.gen.yaml)

version: v2
plugins:
  - local: protoc-gen-python_betterproto
    out: output/pythonbetter/src
    strategy: all
inputs:
  - directory: .
    paths:
      - protos

strategy: all causes this behaviour since it doesn't call protoc once per proto file but once with all. (Which is what you want)

Expected Results

Neatly generated code and no output

Actual Results

Hundreds of these:

path "protocols\\test\\__init__.py" is not equal to "protocols/test/__init__.py", and therefore does not conform to the Protobuf generation specification. The path must be non-empty, relative, use "/" instead of "\" as the path separator, and not use "." or ".." as part of the path. Generation will continue without error here, but please raise an issue with the maintainer of the plugin and reference https://github.com/protocolbuffers/protobuf/blob/95e6c5b4746dd7474d540ce4fb375e3f79a086f8/src/google/protobuf/compiler/plugin.proto#L122
System Information
libprotoc 3.21.12
Python 3.10.12
Name: betterproto
Version: 2.0.0b6
Summary: A better Protobuf / gRPC generator & library
Home-page: https://github.com/danielgtaylor/python-betterproto
Author: Daniel G. Taylor
Author-email: [email protected]
License: MIT
Location: c:\users\erwindehaan\mambaforge\lib\site-packages
Requires: grpclib, python-dateutil
Required-by:

On Windows 11 x64, running in Powershell

Checklist
  • I have searched the issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have verified this issue occurs on the latest prelease of betterproto which can be installed using pip install -U --pre betterproto, if possible.
Lenguaje dominante
Python
Estrellas
1.8k
Forks
235
Métricas de merge de PR
Sin PR fusionados en 30 d

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 danielgtaylor/python-betterproto

Todos los issues de danielgtaylor/python-betterproto

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.