Closed mosteo closed 2 years ago
It's probably worthwhile to homogenize these events so they're run for all releases in the solution at all the described moments. However, these changes would have profound impact on the current build workflow.
The necessary changes would fit well with what is proposed in #628. I suggest we document the current behavior more clearly and leave the big changes for post-1.0. @Fabien-Chouteau, do you agree?
This will have to be a post 1.0 fix indeed.
I'm trying to publish over 6 crates for wayland-ada, but I'm stuck at number 2 because alire fails. I've added crate 1 (wayland_ada_scanner) to https://github.com/onox/alire-index and to my local index. Now I'm trying to alr build -vv -d
crate 2 (wayland_client_ada), which fails:
detail: Running action: Pre_Build run: <project>/./mkdir -p src/protocols
debug: Entering folder: .
detail: Spawning: ["mkdir", "-p", "src/protocols"]
detail: Running action: Pre_Build run: <project>/./wayland_ada_scanner /usr/share/wayland/wayland.xml src/protocols
debug: Entering folder: .
detail: Spawning: ["wayland_ada_scanner", "/usr/share/wayland/wayland.xml", "src/protocols"]
debug: Process errored with code 1
stderr: Command ["wayland_ada_scanner", "/usr/share/wayland/wayland.xml", "src/protocols"] exited with code 1
warn: A pre-build action failed, re-run with -vv -d for details
error: Compilation failed.
What can I do to make alire find the executable?
I guess you know the relative path for wayland_ada_scanner
within its crate. Then, it's a matter of adding this path (in wayland_ada_scanner
), e.g.:
[environment]
PATH.append = "${CRATE_ROOT}/bin"
Except this probably won't work because wayland_ada_scanner
is not built before the post-fetch
action of wayland_client_ada
.
Ah right. Then for this to work we need the incremental build we have discussed previously (#628).
Fixed in #835
During packaging of
rclada
it seems thatpost-fetch
is not run for the root crate.pre-build
is not run for dependencies.If true (need to verify), this means that
post-fetch
only works for dependencies andpre-build
only works for root crates.Update 2021-01-28: this is the intended working per
Alire.Properties.Actions
documentation. It's still counterintuitive and the catalog spec is not clear at all about this.