xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
10.11k stars 784 forks source link

SVN 仓库支持 #5657

Open HenryAWE opened 1 month ago

HenryAWE commented 1 month ago

你在什么场景下需要该功能?

部分代码仓库还在使用 SVN 管理版本(如 xrepo 中的 AngelScript,现在的实现使用的是 GitHub 镜像和官网的代码压缩包),导致 add_requires 无法指定某个具体的提交版本

描述可能的解决方案

add_urls 能够添加 SVN 仓库。对于 SVN 仓库,add_requires 可以提供指定具体 revision (如 add_requires("lib_name r1234") ,或者是用 add_requires("lib_name trunk") 使用仓库中最新的提交

描述你认为的候选方案

No response

其他信息

No response

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


Title: SVN warehouse support

In what scenario do you need this feature?

Some code repositories still use SVN to manage versions ([such as AngelScript in xrepo, the current implementation uses GitHub mirrors and official website code compression packages](https://github.com/xmake-io/xmake-repo/blob /dev/packages/a/angelscript/xmake.lua)), causing add_requires to be unable to specify a specific submission version

Describe possible solutions

add_urls can add SVN repositories. For SVN repositories, add_requires can specify a specific revision (such as add_requires("lib_name r1234"), or use add_requires("lib_name trunk") to use the latest commit in the repository)

Describe your alternatives

No response

Other information

No response

waruqi commented 1 month ago

对于 xmake-repo 官方仓库,即使它仅仅提供 svn url ,那也要在 xmake-mirror 做 git 镜像来引入的,不能直接使用 svn 。。

即使 xmake 本身支持 svn 拉取,但是毕竟引入了 svn 这个额外的依赖,一个用了 svn 包的项目,丢给其他用户去编译。。不可能所有用户都默认安装了 svn ,这就要求用户去额外安装 svn client,平白增加了复杂度和使用门槛。

而 git 对于 xmake 来说,即使用户没装,xmake 也会提前自动下载安装。并且现在用户设备上 git 的覆盖率也相当高了,所以没啥门槛。

另外,xmake 对 git 的自动下载安装,是假定所有包都是走的 git 而不是 svn 。。因此无法再去额外的提前自动安装另外一个 svn。

waruqi commented 1 month ago

如果对于私有仓库,可以考虑支持 svn ,但这个需求量不大,优先级不高,想要支持,可以直接提 pr 过来,另外每个包也可以自定义 on_download 去配置使用 svn 下载,不用 xmake 内部支持

star-hengxing commented 1 month ago

workaround: 自己在 on_install 调用 svn checkout 也行。总之就是要自定义包描述

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


For the xmake-repo official repository, even if it only provides svn url, it must be introduced as a git mirror in xmake-mirror, and svn cannot be used directly. .

Even though xmake itself supports svn pulling, it still relies on additional dependencies on svn. A project using the svn package is left to other users to compile. . It is impossible for all users to install svn by default, which requires users to install an additional svn client, which increases the complexity and usage threshold.

For git and xmake, even if the user does not install it, xmake will automatically download and install it in advance. And now the coverage of git on user devices is quite high, so there is no threshold.

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


If you have a private warehouse, you can consider supporting svn, but the demand for this is not large and the priority is not high. If you want support, you can directly submit a PR.