Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Separate the compiler and the lib source code

未关闭
#648 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
停滞
技术栈
python

调研方向

该 issue 没有指出任何文件、测试或入口点。首先梳理编译器和库的源代码、打包方式、依赖项以及 Python 版本约束定义在哪里;然后确定如何将它们作为独立环境分发。完成的标准是:编译器用户需要编译器依赖,而库用户可以独立安装和使用该库,同时保留所述的兼容性差异。

由索引模型根据 Issue 内容生成。

描述

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

主要语言
Python
星标
1.8k
派生
235
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

danielgtaylor/python-betterproto 的其他 Issue

查看 danielgtaylor/python-betterproto 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。