Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Separate the compiler and the lib source code

Aperta
#648 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

L'issue non nomina file, test o punti di ingresso. Inizia mappando dove sono definiti il codice sorgente del compilatore e della libreria, il packaging, le dipendenze e i vincoli sulla versione di Python; quindi determina come possano essere distribuiti come ambienti separati. Il lavoro è completato quando gli utenti del compilatore necessitano delle dipendenze del compilatore, mentre gli utenti della libreria possono installare e utilizzare la libreria in modo indipendente, preservando le differenze di compatibilità indicate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

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

Lingua principale
Python
Stelle
1.8k
Fork
235
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di danielgtaylor/python-betterproto

Tutte le issue di danielgtaylor/python-betterproto

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.