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