danielgtaylor / danielgtaylor/python-betterproto

Separate the compiler and the lib source code

Ouverte
#648 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Python
Étoiles
1.8k
Forks
234
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## 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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

L’issue ne nomme aucun fichier, test ou point d’entrée. Commencez par déterminer où sont définis le code source du compilateur et de la bibliothèque, le packaging, les dépendances et les contraintes de version de Python ; déterminez ensuite comment ils peuvent être distribués sous forme d’environnements séparés. Le travail est considéré comme terminé lorsque les utilisateurs du compilateur ont besoin des dépendances du compilateur, tandis que les utilisateurs de la bibliothèque peuvent installer et utiliser la bibliothèque indépendamment, les différences de compatibilité indiquées étant préservées.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
build-system, tooling
Type d'issue
Refactorisation
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.