danielgtaylor / danielgtaylor/python-betterproto

Separate the compiler and the lib source code

オープン
#648 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

enhancement
主要言語
Python
スター
1.8k
フォーク
234
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

この Issue ではファイル、テスト、エントリーポイントが指定されていません。まず、コンパイラとライブラリのソース、パッケージング、依存関係、Python バージョンの制約がどこで定義されているかを把握し、次に、それらを分離された環境として配布する方法を明らかにします。完了とは、コンパイラのユーザーにはコンパイラの依存関係が必要であり、ライブラリのユーザーはライブラリを独立してインストールして使用でき、示されている互換性の違いが維持されている状態です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system, tooling
issue の種類
リファクタリング
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。