fix(mcpplibs-xpkg): generate lua_stdlib before the description is read - #17
Merged
Merged
Conversation
#16 把生成物显式列进了源码列表,但它仍然由 `before_build` 生成 —— **而 before_build 比模块扫描还晚**。扫描 xpkg-executor.cppm 时 `import mcpplibs.xpkg.lua_stdlib` 找不到提供者,构建在 before_build 触发之前就停了: missing mcpplibs.xpkg.lua_stdlib dependency for module mcpplibs.xpkg.executor libxpkg 老版本能用 before_build,是因为它把生成物放在**独立 target** 里、由 `add_deps` 保证先构建;0.0.42 起布局扁平化,没有这层时序可依。 改为在 `on_install` 里**先生成、再写 xmake.lua**:文件在描述被读取时就已经是 一个普通源文件,`src/*.cppm` 那个 glob 自然收得到,时序问题整个消失。 实测:改前 `install mcpplibs-xpkg 0.0.57 .. failed`,改后 `.. ok`。
`mbedtls >=3.6.1` 会解析到 4.2.0,而 mbedtls 4.x 重排了头文件目录 ——
`<mbedtls/entropy.h>` 变成了 `<mbedtls/private/entropy.h>`。于是 tinyhttps
根本编不过:
src/tls.cppm:4:10: fatal error: mbedtls/entropy.h: No such file or directory
只要机器上能拿到 mbedtls 4.x,这个包就装不上。加上界 `<4.0`。
Member
Author
|
又追加一条(同样是拿 xmake 真实构建 xlings 撞出来的):
只要机器上能拿到 mbedtls 4.x 这个包就装不上。已改为 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#16 把生成物显式列进了源码列表,但它仍由
before_build生成 —— before_build 比模块扫描还晚。扫描xpkg-executor.cppm时import mcpplibs.xpkg.lua_stdlib找不到提供者,构建在 before_build 触发之前就停了:libxpkg 老版本能用 before_build,是因为它把生成物放在独立 target、由
add_deps保证先构建;0.0.42 起布局扁平化,没有这层时序可依。改为在
on_install里先生成、再写 xmake.lua`:文件在描述被读取时就已是普通源文件,glob 自然收得到。实测:改前
install mcpplibs-xpkg 0.0.57 .. failed,改后.. ok。