danielgtaylor / danielgtaylor/python-betterproto

Separate the compiler and the lib source code

Abierto
#648 1 comentario 1 reacción 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
1.8k
Forks
234
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

## The Problem

Currently, the code of betterproto's compiler and betterproto's lib are together, in the same repo, same Python environment, etc.

This has several disadvantages:

- The users of already compiled files will still need the source code of betterproto's compiler, even if they will never run it
- If changes are made only on the compiler, all users will be affected and will need to update betterproto even if they are not concerned by the update.
- These two parts of betterproto don't have the same requirements concerning the Python version: we need to support old versions in the library since users may need them... But we should be able to use the latest Python version in the compiler to make the development easier (the users won't be impacted).
- In the same spirit, the compiler part is an application (we can choose the version of the dependencies we rely on), while the lib is a library which should support a wide range of versions for its dependencies.
- The dependencies needed by the compiler are marked as optional to avoid forcing all the users to download them... But it means that these packages may not be installed when using the compiler. For now, an ad-hoc error message is shown, and the users need to manually install the dependencies.

## The Ideal Solution

I think it would be better to split the source code in two parts: the compiler and the library. These two parts would have different Python environment.

## Note

This change has a very low priority, but I think it would be a nice improvement. If we do it, it should be done before v2. I can realize the change later... I'll take about it on Discord soon

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

El issue no menciona archivos, pruebas ni puntos de entrada. Empieza por determinar dónde se definen el código fuente del compilador y de la biblioteca, el empaquetado, las dependencias y las restricciones de versión de Python; después, determina cómo pueden distribuirse como entornos separados. Se considera terminado cuando los usuarios del compilador necesitan las dependencias del compilador, mientras que los usuarios de la biblioteca pueden instalarla y usarla de forma independiente, manteniendo las diferencias de compatibilidad indicadas.

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

Evaluación

Stack tecnológico
python
Área
build-system, tooling
Tipo de issue
Refactorización
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.