cross-rs/cross

Config via `package.metadata` does not get read when in a workspace

tgross35 opened this issue · 2 comments

Checklist

Describe your issue

I have a Cargo.toml with the following dummy command:

[package.metadata.cross.build]
pre-build = ["IOIOOIJOIJI"]

As expected, running cross fails:

$ cross t --target aarch64-unknown-linux-musl
[+] Building 0.9s (5/5) FINISHED                                                docker:default
 => [internal] load build definition from Dockerfile.aarch64-unknown-linux-musl-custom    0.1s
 => => transferring dockerfile: 250B                                                      0.0s
 => [internal] load .dockerignore                                                         0.1s
 => => transferring context: 2B                                                           0.0s
 => [internal] load metadata for ghcr.io/cross-rs/aarch64-unknown-linux-musl:0.2.5        0.0s
 => [1/2] FROM ghcr.io/cross-rs/aarch64-unknown-linux-musl:0.2.5                          0.5s
 => ERROR [2/2] RUN eval "IOIOOIJOIJI"                                                    0.3s
------
 > [2/2] RUN eval "IOIOOIJOIJI":
0.258 /bin/sh: 1: eval: IOIOOIJOIJI: not found

However: putting the package in a workspace, i.e. adding an entry in a higher-level Cargo.toml, seems to make this pre-build script get skipped.

What target(s) are you cross-compiling for?

aarch64-unknown-linux-musl

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross -.2.5

Example

No response

Additional information / notes

No response

This is related to / a duplicate of #1158

Ah yes, thanks