Skip to content
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

v3.0 Roadmap #5527

Open
2 of 8 tasks
waruqi opened this issue Aug 28, 2024 · 69 comments
Open
2 of 8 tasks

v3.0 Roadmap #5527

waruqi opened this issue Aug 28, 2024 · 69 comments

Comments

@waruqi
Copy link
Member

waruqi commented Aug 28, 2024

If there are proposed changes that you would like to see introduced in xmake v3.0, you can submit them here.

It will be adopted if the vote result >= 80%.

we can use set_policy("compatibility.version", "3.0") or xmake f --policies=compatibility.version:3.0 to attempt v3.0

Roadmap (Adopted)

Roadmap (Draft)

@waruqi waruqi added this to the v3.0.0 milestone Aug 28, 2024
@waruqi waruqi pinned this issue Aug 28, 2024
@24bit-xjkp
Copy link
Contributor

Support dynamical script load, so we can distribute some xmake scripts by packages. This would be useful when sharing some scripts between projects.

@waruqi
Copy link
Member Author

waruqi commented Aug 28, 2024

Support dynamical script load, so we can distribute some xmake scripts by packages. This would be useful when sharing some scripts between projects.

This key point is difficult to be implemented because the package is not yet installed when it is first compiled. We can currently only distribute packages rules.

@SirLynix
Copy link
Member

A better way for xmake packages to pull off info from their build xmake.lua, to avoid having to duplicate defines and such

@heheda123123
Copy link
Contributor

I think it is very important to improve the documentation, now the documentation of a few more serious problems
1 Even if I select Chinese in xmake.io, the search still comes up with English results
2 Some methods are not found in the documentation

@KkemChen
Copy link
Contributor

支持对apt,pkg-config等系统库指定使用动态库或静态库

@jingkaimori
Copy link
Contributor

jingkaimori commented Aug 28, 2024

elements of target

Re-consider relationship of rules, toolchains, config variables, values and policies.

Table below shows which entity can hold which element:

entity type rule toolchain config variable value policies
option v
target v v v v v
(global space) v v v v
package
xpack

Option

should option be a type of task, or just a object like value? should option checks itself?

@waruqi
Copy link
Member Author

waruqi commented Aug 28, 2024

I think it is very important to improve the documentation, now the documentation of a few more serious problems 1 Even if I select Chinese in xmake.io, the search still comes up with English results 2 Some methods are not found in the documentation

new document, https://docs.xmake.io/en-us/index.html

But I don't have a lot of time alone to update and perfect it.

@24bit-xjkp
Copy link
Contributor

Maybe we can use document generators like LDoc and embed the document into annotations.

@Issues-translate-bot
Copy link

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


Supports specifying the use of dynamic libraries or static libraries for system libraries such as apt and pkg-config.

@waruqi
Copy link
Member Author

waruqi commented Aug 28, 2024

Remove support for built-in variables in script scope, support it only in the description scope, Poll: #5529

@qudix
Copy link

qudix commented Aug 28, 2024

A way to reuse rules in a project that uses xmake, but in a package definition without duplicating work.
https://github.com/shad0wshayd3-FO4/CommonLibF4/blob/master/CommonLibF4/xmake.lua#L133

If such a thing requires some modifications on the lib side, that's fine.

@WubiCookie
Copy link
Contributor

Rename buildir to builddir

@waruqi
Copy link
Member Author

waruqi commented Aug 29, 2024

Rename buildir to builddir

Poll: #5533

@A2va
Copy link
Contributor

A2va commented Aug 29, 2024

For my project xmake-rs, I wanted xmake to send the resolved list of a target's links to the rust part. This way the user wouldn't need to link anything in the build.rs.
To do this, I had to copy a large part of the xmake source code, my idea would be to add a target:orderlinks() function which would return a resolved list of links on a binary target.
I thought about using target:linkcmd(), but the flags are different for different compilers and you'd have to parse them.

@star-hengxing
Copy link
Contributor

Use ninja generator for cmake package by default.

@waruqi
Copy link
Member Author

waruqi commented Aug 30, 2024

Use ninja generator for cmake package by default.

Poll: #5545

@jube
Copy link

jube commented Aug 30, 2024

Add a way to really clean everything. Sometimes, I need to delete .xmake directories (and/or build directory) in order to fix a build that should work. A nice command like xmake mrproper would be nice to delete everything, as if it was a fresh installation of xmake (like on a CI).

@waruqi
Copy link
Member Author

waruqi commented Aug 30, 2024

Add a way to really clean everything. Sometimes, I need to delete .xmake directories (and/or build directory) in order to fix a build that should work. A nice command like xmake mrproper would be nice to delete everything, as if it was a fresh installation of xmake (like on a CI).

xmake f -c will ignore all configuration cache.

@SirLynix
Copy link
Member

A way to change config without having to respecify all config, maybe separate some configs such as mode from other configs. It's quite painful to work with a lot of config because of that.

@KkemChen
Copy link
Contributor

希望option域里面 能够支持 add_rules 接口

@Issues-translate-bot
Copy link

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


It is hoped that the add_rules interface can be supported in the option domain.

@xq114
Copy link
Contributor

xq114 commented Aug 31, 2024

希望定义option时可以直接指定default值,而不用这样再包一层 https://github.com/xmake-io/xmake-repo/blob/dev/packages/a/angle/port/6288/xmake.lua

@Issues-translate-bot
Copy link

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


I hope that when defining options, I can directly specify the default value without having to wrap it up again https://github.com/xmake-io/xmake-repo/blob/dev/packages/a/angle/port/6288/xmake.lua

@waruqi
Copy link
Member Author

waruqi commented Sep 1, 2024

希望定义option时可以直接指定default值,而不用这样再包一层 https://github.com/xmake-io/xmake-repo/blob/dev/packages/a/angle/port/6288/xmake.lua

原本就可以直接指定,这里的问题是你用了 is_plat ,想要在 option 里用,只能在脚本域。这个是本身机制决定的,没法在描述域实现

@heheda123123
Copy link
Contributor

heheda123123 commented Sep 2, 2024

跑测试的时候,是否有必要把所有的config也测试到呢?
比如下面的pr,其实是测试不到新添加的config的
xmake-io/xmake-repo#5115

或者说写包描述的时候可以给config添加一个字段指定是否对这个config进行自动测试

@waruqi
Copy link
Member Author

waruqi commented Sep 2, 2024

跑测试的时候,是否有必要把所有的config也测试到呢? 比如下面的pr,其实是测试不到新添加的config的 xmake-io/xmake-repo#5115

或者说写包描述的时候可以给config添加一个字段指定是否对这个config进行自动测试

这个不太现实,新增一个config ,排列组合下,ci 的测试 job 是数量级暴增的,一个 config 如果不是 boolean 值,是 string values 的,组合就更多, 还可能引入各种 deps 编译,没这么多资源,不仅耗时,耗ci资源,跑出问题,也没这么多人力修。

@Issues-translate-bot
Copy link

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


When running tests, is it necessary to test all configs? For example, in the PR below, the newly added config cannot be tested xmake-io/xmake-repo#5115

Or when writing a package description, you can add a field to the config to specify whether to automatically test this config.

This is not realistic. If you add a new config, the number of ci test jobs will increase by orders of magnitude under the permutation and combination. Without so many resources, it will not only be time-consuming, but also consume ci resources. If problems occur, there will not be so many manpower to repair them.

@xq114
Copy link
Contributor

xq114 commented Sep 10, 2024

可以解决,不过这样的话,每个项目都得设置一遍环境变量,略繁琐,本身我是明确了不需要xmake使用特定路径下的工具链

每个项目都用不同的toolchain吗?一般有一两个全局虚拟环境就可以了吧

@Issues-translate-bot
Copy link

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


It can be solved, but in this case, environment variables must be set for each project, which is a bit cumbersome. I have made it clear that xmake does not need to use the tool chain under a specific path.

Does each project use a different toolchain? Generally, one or two global virtual environments will suffice.

@heheda123123
Copy link
Contributor

可以解决,不过这样的话,每个项目都得设置一遍环境变量,略繁琐,本身我是明确了不需要xmake使用特定路径下的工具链

每个项目都用不同的toolchain吗?一般有一两个全局虚拟环境就可以了吧

现在是这样,
1 PATH里面只有msys2中bin的环境变量
2 如果用xmake使用msvc去编译项目,他会混合使用到msys2中的库(好像是这种情况,反正是混合了不同工具链的库,之前issue提过,但是找不到了,最后就是去掉msys2的库才正常)

我现在是希望xmake不管我在环境变量中加的这个msys2中的库

@Issues-translate-bot
Copy link

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


It can be solved, but in this case, environment variables must be set for each project, which is a bit cumbersome. I have made it clear that xmake does not need to use the tool chain under a specific path.

Does each project use a different toolchain? Generally, one or two global virtual environments will suffice.

This is now the case,
1 PATH only contains the environment variables of bin in msys2
2 If you use msvc to compile the project using The library is normal)

I now hope that xmake will ignore the library in msys2 that I added in the environment variable.

@xq114
Copy link
Contributor

xq114 commented Sep 10, 2024

可以解决,不过这样的话,每个项目都得设置一遍环境变量,略繁琐,本身我是明确了不需要xmake使用特定路径下的工具链

每个项目都用不同的toolchain吗?一般有一两个全局虚拟环境就可以了吧

现在是这样, 1 PATH里面只有msys2中bin的环境变量 2 如果用xmake使用msvc去编译项目,他会混合使用到msys2中的库(好像是这种情况,反正是混合了不同工具链的库,之前issue提过,但是找不到了,最后就是去掉msys2的库才正常)

我现在是希望xmake不管我在环境变量中加的这个msys2中的库

这个很奇怪啊,msys2的库名字是xxx.dll.a,msvc是.lib,格式都不一样不应该链接上的,除非用了msys2 gfortran之类工具;这种情况把自己的flang/intel fortran放gfortran前面也能解决问题。感觉根本问题不在环境变量,在xmake找系统toolchain/library的机制

@Issues-translate-bot
Copy link

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


It can be solved, but in this case, environment variables must be set for each project, which is a bit cumbersome. I have made it clear that xmake does not need to use the tool chain under a specific path.

Does each project use a different toolchain? Generally, one or two global virtual environments will suffice.

Now this is the case, 1 PATH only contains the environment variable of bin in msys2 2 If you use xmake and msvc to compile the project, it will mix the libraries in msys2 (this seems to be the case, anyway, it is a mixture of libraries from different tool chains) , it was mentioned in the issue before, but it can’t be found. In the end, it was normal to remove the msys2 library)

I now hope that xmake will ignore the library in msys2 that I added in the environment variable.

This is very strange. The library name of msys2 is xxx.dll.a, and msvc is .lib. The formats are different and should not be linked, unless tools such as msys2 gfortran are used; in this case, replace your own flang/intel fortran Putting it in front of gfortran can also solve the problem. I feel that the fundamental problem is not in the environment variables. I am looking for the system toolchain/library mechanism in xmake.

@heheda123123
Copy link
Contributor

heheda123123 commented Sep 10, 2024

可以解决,不过这样的话,每个项目都得设置一遍环境变量,略繁琐,本身我是明确了不需要xmake使用特定路径下的工具链

每个项目都用不同的toolchain吗?一般有一两个全局虚拟环境就可以了吧

现在是这样, 1 PATH里面只有msys2中bin的环境变量 2 如果用xmake使用msvc去编译项目,他会混合使用到msys2中的库(好像是这种情况,反正是混合了不同工具链的库,之前issue提过,但是找不到了,最后就是去掉msys2的库才正常)
我现在是希望xmake不管我在环境变量中加的这个msys2中的库

这个很奇怪啊,msys2的库名字是xxx.dll.a,msvc是.lib,格式都不一样不应该链接上的,除非用了msys2 gfortran之类工具;这种情况把自己的flang/intel fortran放gfortran前面也能解决问题。感觉根本问题不在环境变量,在xmake找系统toolchain/library的机制

找到了,是这个issue
#4479

主要问题应该是“path 里面加了 pkg-config”,xmake会使用这个msys下的pkg-config

@Issues-translate-bot
Copy link

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


It can be solved, but in this case, each project has to set the environment variables, which is a bit cumbersome. I have made it clear that xmake does not need to use the tool chain under a specific path.

Does each project use a different toolchain? Generally, one or two global virtual environments will suffice.

Now this is the case, 1 PATH only contains the environment variable of bin in msys2 2 If you use xmake and msvc to compile the project, it will mix the libraries in msys2 (this seems to be the case, anyway, it is a mix of different tool chains) The library was mentioned in the previous issue, but it could not be found. In the end, it was normal to remove the msys2 library)
I now hope that xmake will ignore the library in msys2 that I added in the environment variable.

This is very strange. The library name of msys2 is xxx.dll.a, and msvc is .lib. The formats are different and should not be linked, unless tools such as msys2 gfortran are used; in this case, change your own flang/intel Putting fortran in front of gfortran can also solve the problem. I feel that the fundamental problem is not in the environment variables. I am looking for the system toolchain/library mechanism in xmake.

Found it, it’s this issue
#4479

@xq114
Copy link
Contributor

xq114 commented Sep 10, 2024

Found it, it’s this issue #4479

但 xmake 无法通过 pkg-config 去判断返回的库是 gnulib 还是 mslib 格式,只能假定都可使用。

这个是可以判断的,parse完linkdir之后 https://github.com/xmake-io/xmake/blob/dev/xmake/modules/package/manager/pkgconfig/find_package.lua#L88-L89 这里区分一下后缀名.a/.lib就行了。尽管这里msys2的zlib msvc也能用,但混用mingw格式包的这种行为还是默认禁用为好,实在要用可以加一个policy 控制 是否对msvc启用mingw格式的包

@xq114
Copy link
Contributor

xq114 commented Sep 10, 2024

可以新开一个issue

@Issues-translate-bot
Copy link

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


Found it, it’s this issue #4479

But xmake cannot determine whether the returned library is in gnulib or mslib format through pkg-config, and can only assume that both can be used.

This can be judged after parse linkdir https://github.com/xmake-io/xmake/blob/dev/xmake/modules/package/manager/pkgconfig/find_package.lua#L88-L89 Let’s distinguish the suffix names here .a/.lib will do. Although zlib msvc of msys2 can also be used here, the behavior of mixing mingw format packages is better to be disabled by default. If you really want to use it, you can add a policy to control whether to enable mingw format packages for msvc.

@Issues-translate-bot
Copy link

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


You can open a new issue

@waruqi
Copy link
Member Author

waruqi commented Sep 10, 2024

可以解决,不过这样的话,每个项目都得设置一遍环境变量,略繁琐,本身我是明确了不需要xmake使用特定路径下的工具链

每个项目都用不同的toolchain吗?一般有一两个全局虚拟环境就可以了吧

现在是这样, 1 PATH里面只有msys2中bin的环境变量 2 如果用xmake使用msvc去编译项目,他会混合使用到msys2中的库(好像是这种情况,反正是混合了不同工具链的库,之前issue提过,但是找不到了,最后就是去掉msys2的库才正常)
我现在是希望xmake不管我在环境变量中加的这个msys2中的库

这个很奇怪啊,msys2的库名字是xxx.dll.a,msvc是.lib,格式都不一样不应该链接上的,除非用了msys2 gfortran之类工具;这种情况把自己的flang/intel fortran放gfortran前面也能解决问题。感觉根本问题不在环境变量,在xmake找系统toolchain/library的机制

找到了,是这个issue #4479

主要问题应该是“path 里面加了 pkg-config”,xmake会使用这个msys下的pkg-config

这个到 #4479 里面去讨论,或者新开 issues 就行了。

@Issues-translate-bot
Copy link

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


It can be solved, but in this case, environment variables must be set for each project, which is a bit cumbersome. I have made it clear that xmake does not need to use the tool chain under a specific path.

Does each project use a different toolchain? Generally, one or two global virtual environments will suffice.

Now this is the case, 1 PATH only contains the environment variable of bin in msys2 2 If you use xmake and msvc to compile the project, it will mix the libraries in msys2 (this seems to be the case, anyway, it is a mix of different tool chains) The library was mentioned in the previous issue, but it could not be found. In the end, it was normal to remove the msys2 library)
I now hope that xmake will ignore the library in msys2 that I added in the environment variable.

This is very strange. The library name of msys2 is xxx.dll.a, and msvc is .lib. The formats are different and should not be linked, unless tools such as msys2 gfortran are used; in this case, change your own flang/ Putting intel fortran in front of gfortran can also solve the problem. I feel that the fundamental problem is not in the environment variables. I am looking for the system toolchain/library mechanism in xmake.

Found it, it’s issue #4479

The main problem should be that "pkg-config is added to the path", xmake will use this pkg-config under msys

Just discuss this in #4479, or open a new issue.

@Arteiimis
Copy link

#5609

@heheda123123
Copy link
Contributor

#5609

支持,现在的musl.cc工具链只能从linux上跨平台/架构编译。这个工具链能大大扩展交叉编译的能力

@Issues-translate-bot
Copy link

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


#5609

Supported, the current musl.cc toolchain can only be compiled cross-platform/architecture from Linux. This tool chain can greatly expand cross-compilation capabilities

waruqi added a commit that referenced this issue Sep 15, 2024
@waruqi
Copy link
Member Author

waruqi commented Sep 15, 2024

We can use set_policy("compatibility.version", "3.0") or xmake f --policies=compatibility.version:3.0 to attempt v3.0

f9196df

@waruqi
Copy link
Member Author

waruqi commented Sep 15, 2024

New Poll: Autobuild when calling xmake run
#5624

@waruqi
Copy link
Member Author

waruqi commented Sep 16, 2024

Now we can use set_policy("compatibility.version", "3.0") to switch vs runtime to MD/Md

#5626

@SnowinterCat
Copy link

我需要一个接口来遍历我的项目依赖的三方库的列表,我需要将三方库的二进制打包到我的安装包中。
我现在的做法是在脚本域中使用以下代码来获取三方库的二进制的:

        import("core.project.project")
        cprint("${yellow}Export Shared libs")
        for pkg_name, info in pairs(project:required_packages()) do
            local libfiles = info:get("libfiles")
        end

但是这只能获取到三方库的库文件,对于一些拥有插件或者工具的三方库,例如gstreamer、ffmpeg、qt,我需要用到他们的工具和插件,并将其打包到安装包中。目前我没有办法做到直接从xmake的脚本域中找到它们
能否提供一个函数例如project:all_packages(),target:all_packages()来获取到他们的manifest信息?

又或者为package的包管理中添加一个on_export_runtime(),可以用于一键导出三方库的运行时?

@Issues-translate-bot
Copy link

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


I need an interface to traverse the list of third-party libraries that my project depends on, and I need to package the binaries of the third-party libraries into my installation package.
My current approach is to use the following code in the script domain to obtain the binary of the third-party library:

        import("core.project.project")
        cprint("${yellow}Export Shared libs")
        for pkg_name, info in pairs(project:required_packages()) do
            local libfiles = info:get("libfiles")
        end

But this can only obtain the library files of third-party libraries. For some third-party libraries with plug-ins or tools, such as gstreamer, ffmpeg, and qt, I need to use their tools and plug-ins and package them into the installation package. Currently I have no way to find them directly from xmake's script domain
Can you provide a function such as project:all_packages(), target:all_packages() to obtain their manifest information?

Or add an on_export_runtime() to the package management of the package, which can be used to export the runtime of third-party libraries with one click?

@waruqi
Copy link
Member Author

waruqi commented Sep 25, 2024

我需要一个接口来遍历我的项目依赖的三方库的列表,我需要将三方库的二进制打包到我的安装包中。 我现在的做法是在脚本域中使用以下代码来获取三方库的二进制的:

        import("core.project.project")
        cprint("${yellow}Export Shared libs")
        for pkg_name, info in pairs(project:required_packages()) do
            local libfiles = info:get("libfiles")
        end

但是这只能获取到三方库的库文件,对于一些拥有插件或者工具的三方库,例如gstreamer、ffmpeg、qt,我需要用到他们的工具和插件,并将其打包到安装包中。目前我没有办法做到直接从xmake的脚本域中找到它们 能否提供一个函数例如project:all_packages(),target:all_packages()来获取到他们的manifest信息?

又或者为package的包管理中添加一个on_export_runtime(),可以用于一键导出三方库的运行时?

这种问题,没必要在这里问,可以到 discussion 里提,target:pkgs() ,pkg:installdir() 原本就能取到。

@Issues-translate-bot
Copy link

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


I need an interface to traverse the list of third-party libraries that my project depends on, and I need to package the binaries of the third-party libraries into my installation package. My current approach is to use the following code in the script domain to obtain the binary of the third-party library:

import("core.project.project")
cprint("${yellow}Export Shared libs")
for pkg_name, info in pairs(project:required_packages()) do
local libfiles = info:get("libfiles")
end

But this can only obtain the library files of third-party libraries. For some third-party libraries with plug-ins or tools, such as gstreamer, ffmpeg, and qt, I need to use their tools and plug-ins and package them into the installation package. Currently, I have no way to find them directly from the script domain of xmake. Can you provide a function such as project:all_packages(), target:all_packages() to get their manifest information?

Or add an on_export_runtime() to the package management of the package, which can be used to export the runtime of third-party libraries with one click?

There is no need to ask this kind of question here. You can mention it in the discussion. Target:pkgs() and pkg:installdir() can be obtained originally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests