-
-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote package management #69
Comments
Great! I have finished the for example: $ xmake repo --add origin https://github.com/tboox/xmake-repo.git
$ xmake repo --add other-repo https://github.com/xxxx/other-repo.git Or use global add_repositories("origin https://github.com/tboox/xmake-repo.git")
add_repositories("other-repo https://github.com/other/other-repo.git") And the |
And we can add requires and add package dependencies (developing ..) Add requires: add_requires("tboox.tbox >=1.5.1", "zlib >=1.2.11")
add_requires("zlib master")
add_requires("xmake-repo@tboox.tbox >=1.5.1")
add_requires("https://github.com/tboox/tbox.git@tboox.tbox >=1.5.1") Add package dependencies: target("test")
add_packages("tboox.tbox", "zlib") If you run |
It's all great 👍 |
How did you plan to handle that case? add_requires("https://github.com/tboox/tbox.git@tboox.tbox >=1.5.1") |
Excuse me, I'm wondering what's the advantage of |
@uael I just place xmake.lua and other some text files (.e.g *.patch) in
If this git project has not tags, we can set a branch name, for example: Or you can directly define package("tboox.tbox")
add_versions("1.5.1", "1.6.0", "1.6.1") -- we can add a version list if no git tags
set_url("https://github.com/tboox/tbox/archive/v$(v1).$(v2).$(v3).tar.gz")
on_build(function ()
-- if need
end)
on_package(function ()
-- if need
end)
add_requires("tboox.tbox >=1.5.1") We also use |
@titansnow Some advantages:
In most cases, you only need to add two lines in add_requires("pcre2 >=1.2.0", "zlib >= 1.2.11")
target("test")
add_packages("pcre2", "zlib") Then run: $ xmake And it will show tips when the version of package dependences have been changed in
|
@uael |
Sounds like fun. Like it:heart:. May it be hard work? |
@titansnow actually the following isn't possible with git submodule:
|
In the case of provided binary files i just dunno how to handle it properly, wondering what's your feeling about it |
I got it @uael |
As for me I prefer "code once, compile everywhere" @uael |
"code once, compile everywhere" does not prevent to avoid compile time on large build with a bunch of dependencies 👍 |
@waruqi uael@leopard:~/.cache$ tree xmake/
xmake/
└── repositories
└── xmake-repo
├── libuv # vendor level
│ ├── libuv # package level
│ │ ├── 0_1_0.lua # contains specific version informations
│ │ ├── 0_1_3.lua
│ │ ├── 0_2_0.lua
│ │ ├── 0_2_6.lua
│ │ └── xmake.lua # general package informations
│ └── xmake.lua # general vendor informations
├── tboox
│ ├── gbox
│ │ ├── 1_0_1.lua
│ │ ├── 1_0_2.lua
│ │ ├── 1_0_3.lua
│ │ └── xmake.lua
│ ├── tbox
│ │ ├── 1_5_3.lua
│ │ ├── 1_6_0.lua
│ │ ├── 1_6_1.lua
│ │ └── xmake.lua
│ └── xmake.lua
└── zlib
├── xmake.lua
└── zlib
├── 1_2_11.lua
└── xmake.lua
9 directories, 18 files With this structure we can clone the |
Seems right |
Maybe git large file storage is suitable for you @uael |
@uael Yes, I'm planning to clone repositories globally in the first time and then only need to |
I added a For example ( -- define package
package("mbedtls")
set_url("git@github.com:ARMmbed/mbedtls.git")
on_build(function (package)
end)
on_install(function (package)
end)
package_end()
-- requires
add_requires("mbedtls master optional") -- optional dependent package
add_requires("zlib >=1.2.11", "xmake-repo@tboox.tbox >=1.5.1")
add_requires("git@github.com:glennrp/libpng.git@libpng >=1.6.28") |
Love it 👍 |
You need test installed packages? xmake will first detect whether a package has been installe, then install it if it does not exist. |
More I look at your commits on repo, more I seriously envisage to use lua 👍 |
you can use -- require package for `xmake config --zlib=y|n` or checking and installing automatically
add_requires("zlib >1.2")
target("xxxx")
set_kind("binary")
add_files("*.c")
if is_package("zlib") then
add_defines("-DZLIB_ENABLED")
end
|
I rename # install all package dependencies in xmake.lua
$ xmake [q|require]
# install the given required packages manually
$ xmake require zlib tboox.tbox
$ xmake require "zlib >=1.2.11" "tboox.tbox master"
$ xmake require "git@github.com:tboox/tbox.git@tboox.tbox >=1.6.0 <1.6.1 || master" |
By the way, may I ask how soon |
I just updated from the latest repo uael@aero:~/xmake/tests/projects/deps_console_c$ xmake require -v -f
error: /home/uael/xmake/tests/projects/deps_console_c/xmake.lua:2: attempt to call global 'package' (a nil value)
stack traceback:
[/home/uael/xmake/tests/projects/deps_console_c/xmake.lua:2]: in main chunk It's maybe badly installed from me 😸 |
@uael This should be a installation problem. It will be installed to So maybe the previous version has not been uninstalled or updated and you're running the old version of xmake. You can attempt to run |
Hi @waruqi, how is this going ? I'm currently passing some exams cannot follow as before 😢 |
@uael Thank you very much for your contribution and help. The semantic version module is very great now. I'm implementing And I haven't had much time to focus on semver module lately. If there is a problem with the semantic version in the future, I will try to modify it and submit pr and issues to you. Thanks! |
@uael I'm so sorry I spent too much time in order to implement the detect modules, so the development of package management was delayed. Now I'm going to continue to start this job and hope to be able to complete it in v2.2.1 version. I have merged all patches of the Because there are too many conflicts, I can only merge code manually, and I'm sorry that I didn't keep the information of contributors. 😭 |
A test example: $ cd xmake/tests/project/requires
$ xmake I am improving the dependent environment of requires on each platform (git, curl, ..). |
Can I usr remote package management now? |
@yangjz1125 Not yet, I am processing other issues now. |
Okay, thanks. |
An example: https://github.com/tboox/benchbox Run: $ git clone https://github.com/tboox/benchbox.git
$ cd benchbox
$ xmake |
@yangjz1125 @uael This feature can be used for v2.2.2 An example project: https://github.com/tboox/benchbox Documents: add_requires("tbox 1.6.*", "libpng ~1.16", "zlib")
target("test")
set_kind("binary")
add_files("src/*.c")
add_packages("tbox", "libpng", "zlib") |
Very good work here, repo/package are a well designed approach. I really have to pick a side project to try it out! |
I just finished the docs, thank you for quoting me 😃 Very accurate and understandable by the way |
I have almost completed this feature, and I will continue to improve it and the package repository. xmake-repo Documents: https://xmake.io/#/home?id=remote-dependency-mode |
Remote package management roadmap:
add_requires
: add package require infoadd_repositories
: add repository urladd_packages
: add package dependencies to targetpackage
: package definitionset_urls
add_versions
set_homepage
set_description
add_deps
[on|before|after]_load
: custom load script[on|before|after]_install
: custom install script[on|before|after]_test
: custom test scriptadd_patches
add_links
add_defines
add_includedirs
The text was updated successfully, but these errors were encountered: