Tencent / TubeMQ

TubeMQ has been donated to the Apache Software Foundation and renamed to InLong, please visit the new Apache repository: https://github.com/apache/incubator-inlong
https://inlong.apache.org/
2.02k stars 388 forks source link

Replace force local dependency of protoc with auto-downloading #121

Closed tisonkun closed 3 years ago

tisonkun commented 4 years ago

ref #120

CC @gosonzhang @zehuaiWANG could you please verify this patch locally to see whether or not it resolve #120 ?

zehuaiWANG commented 4 years ago

Looking good to me. I had verified it and it seems to work well, thanks.

gosonzhang commented 4 years ago

This PR has been hanging for a long time, and the main reason for not joining is: I don't want users to have an unpleasant experience for TubeMQ "This is a garbage project because it takes more than 10 minutes for each compilation of the project, which makes users unpleasant". I want to clearly specify the pre-compilation requirements, and let the business itself first install Protobuf, then compile, and give this time to reason.

I want to keep the PR first. All who need to do this can download the local and directly incorporate it into the PR modification. When the TubeMQ project is recognized by more people, and more people are familiar with it, we will join the PR, and see if it is OK


这个PR挂了很久,没有合入的主要原因是:我不想让刚接触TubeMQ的用户在使用时候有不爽的体验 “这是一个垃圾项目,项目每做一次编译都要花上10分钟以上的时间才能完成,甚至编译都编译不成功”;所以想以明确的给出编译前置要求方式进行,让业务自己先去先安装好Protobuf,然后再编译,把这个时间归属给理清楚。

我想先保留该PR,需要这样操作的同学可以下载本地后直接合入该项PR修改;待TubeMQ项目被更多人认可和熟悉后,我们再合入该PR,大家看是否OK

zehuaiWANG commented 4 years ago

@gosonzhang I think you have misunderstood the meaning of this code. It will not pull protobuf every time it compiles. Just like maven, it will only pull and put it in the right place when it compiles for the first time, because not all users are familiar with the installation and configuration of protobuf (especially the project depends on a specific version of protobuf), so in fact, this is more conducive to improving users experience, the first compile time can't be ignored, even if you install protobuf manually.

我觉得您误解了这段代码的意思,他并不会每次编译都去拉取Protobuf,就像maven一样,只会在第一次编译的时候拉取并放在适当的位置,因为并不是所有的用户都熟悉Protobuf的安装和配置(特别是该项目依赖于特定的Protobuf版本),所以实际上这更加有利于提高用户体验,第一次编译这个时间实际上是不能忽略的,哪怕你手动安装Protobuf也需要这个时间。

gosonzhang commented 4 years ago

I just want to achieve an effect: I can compile it, if the project explicitly requires the installation of third-party components, I search for it after installing it and then compile it, and I will not worry about the environment later. Everyone will be patient in the time spent

Currently, the default mode is download and install mode, and we can specify the path of the locally installed protobuf in the core's pom configuration to avoid downloading and installing each time. The location of the protobuf installation in each environment is inconsistent, at the same time, we cannot make every user aware of these settings in TubeMQ. After downloading the project, it is clear that you need to modify this configuration to avoid downloading protobuf each time when Compiling TubeMQ; if the user downloads the code, the protobuf has not been downloaded locally, and an abnormality occurs in the networked warehouse, the user compilation failure is likely to be attributed to the project not being considered.

I think the project should be clear and simple, and it should not be overly implied by users.


我就想达到一个效果,我下下来就可以编译,如果项目明确要求安装第三方组件,我上网搜索方法后安装再编译,后面我就不操心环境的事情。刚开始大家都会很有耐性折腾。

现在方式缺省是下载安装模式,不过需要在core的pom配置里指定本地已安装protobuf的路径,来避免每次都下载安装。而每个环境protobuf安装的位置不一致,同时我们无法做到每个用户都清楚TubeMQ里有这些设置,下载项目后清楚了解要修改这个配置才能避免每次下载protobuf,就很有可能按照下载了编译模式去做;如果用户下载了代码,版本库本地没有下载过protobuf,连网仓库又出现异常,业务编译失败就很有可能归结为项目没有考虑到位。

我认为项目应该清晰,简单点,使用时候不给用户施加隐式要求比较好

tisonkun commented 3 years ago

closed as aborted