Skip to content

Incorrect Parsing of Arrays in Config Files #863

@Alexhuszagh

Description

@Alexhuszagh

Checklist

Describe your issue

If providing arrays in [build.env], they don't seem to be used correctly. For example, the following config files:

Case 1

[build.env]
passthrough = ["CARGO_TERM_COLOR"]

Case 2

[build.env]
passthrough = ["CARGO_TERM_COLOR"]

[target.aarch64-unknown-linux-gnu.env]
passthrough = []

Case 3

[build.env]
passthrough = []

[target.aarch64-unknown-linux-gnu.env]
passthrough = ["CARGO_TERM_COLOR"]

When compiling with CARGO_TERM_COLOR=never cross build --target aarch64-unknown-linux-gnu, we should expect CARGO_TERM_COLOR to passthrough in all cases, but it only does in the last one. We'd expect in case 2 and 3 for the arrays to merge, and in 1 for it to only use the passthrough in [build.env]. It seems to ignore case 1 and 2 though.

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

No response

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 0.2.2

Example

No response

Additional information / notes

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions