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

check-meta: warn about misinterpreted *Array variables #335110

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SomeoneSerge
Copy link
Contributor

@SomeoneSerge SomeoneSerge commented Aug 16, 2024

Description of changes

As per #334973 (comment). The issue originally noted in #318614 (comment).

I never worked with check-meta before, I observe that the warning isn't actually displayed by default, but changing "warn" to validity "no" does produce the expected effect

I also realize that Nix is expected to be painfully slow and that we may not want to extend check-meta without a good reason lest we inflate the eval times

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

pkgs/top-level/config.nix Outdated Show resolved Hide resolved
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outputs look like this:

❯ nix-build -A sudo
trace: Package sudo-1.9.15p5 in /home/ss/Sources/nixpkgs/.worktree/structuredAttrs/pkgs/tools/security/sudo/default.nix:77 The following variables will be misinterpreted as single element bash arrays because __structuredAttrs is not set: configureFlagsArray, continuing anyway.
/nix/store/5y6c2b30ywcliyazpfqxl9xcr3wri46g-sudo-1.9.15p5

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following variables ...: configureFlagsArray, continuing anyway.

This run-on sentence is going to look really odd when there's more than 1 variable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps just “The … variables” (there are unlikely to be many), or “Some variables will be …. The affected variables are: …”.

Copy link
Contributor Author

@SomeoneSerge SomeoneSerge Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trace: Package sudo-1.9.15p5 in /home/ss/Sources/nixpkgs/.worktree/structuredAttrs/pkgs/tools/security/sudo/default.nix:77 The variable "configureFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set, continuing anyway.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Aug 16, 2024
@wolfgangwalther
Copy link
Contributor

Can we make this an error instead of a warning?

Imho, using *Array in nix code (with or without structured attrs, really...) is not what this was intended for. I can currently see 3 cases of it's usage:

  • Sometimes, it can be replaced with it's non-Array variant.
  • Sometimes, it is a workaround to get spaces into the argument (similar to sudo). This is what structuredAttrs is for.
  • pytestFlagsArray and unittestFlagsArray work similar to their non-Array variants, because there is code in python's setup hooks to make it so, IIUC.

All of this is is pointless, if we can support structuredAttrs properly.

Let's do this:

If you want to go ahead with the warning instead, let's make it have the "this will be an error in the future" bit from #334973, too:

concatTo(): configureFlagsArray is not declared as array, treating as a singleton. This will become an error in future

Copy link
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used nix-instantiate --strict --eval --json --system x86_64-linux pkgs/top-level/release-attrpaths-superset.nix -A names | jq -r '.[]' > /tmp/packages to see this error show up.

Blast radius:

trace: Warning while evaluating python3.12-six-1.16.0: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-pytest-xdist-3.6.1: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-execnet-2.1.1: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-pycparser-2.22: «unstructured-arrays»: The variable "unittestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-greenlet-3.0.3: «unstructured-arrays»: The variable "unittestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-pytz-2024.1: «unstructured-arrays»: The variable "unittestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-six-1.16.0: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-pytz-2024.1: «unstructured-arrays»: The variable "unittestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-pytest-timeout-2.3.1: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-numpy-1.26.4: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-fs-2.4.16: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-pandas-2.2.2: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-six-1.16.0: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-pytest-xdist-3.6.1: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-execnet-2.1.1: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-pycparser-2.22: «unstructured-arrays»: The variable "unittestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-greenlet-3.0.3: «unstructured-arrays»: The variable "unittestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-pytz-2024.1: «unstructured-arrays»: The variable "unittestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-mypy-extensions-1.0.0: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-jupyter-core-5.7.2: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-cryptography-43.0.0: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-pytest-subprocess-1.5.0: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-anyio-4.4.0: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-debugpy-1.8.2: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-fastapi-0.112.0: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-sh-2.0.6: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-httpx-0.27.0: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-pydantic-2.8.2: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-phonenumbers-8.13.39: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-starlette-0.37.2: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-tqdm-4.66.4: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating python3.12-faker-25.8.0: «unstructured-arrays»: The variable "pytestFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating sudo-1.9.15p5: «unstructured-arrays»: The variable "configureFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set

So it's high, but it's not super high.

usePlural = variables != [(builtins.head variables)];
plural = optionalString usePlural "s";
in
{ valid = "warn";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @wolfgangwalther that this ought to be an error, but the set of packages it touches is pretty high. We'll patch it all up in the next staging-next.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to consider out‐of‐tree users too. I agree with the suggestion to add the “this will break” warning and then make it a hard error on the next release.

Comment on lines +455 to +459
quote = s: ''"${s}"'';
variables = unstructuredArrays attrs;
variablesStr = builtins.concatStringsSep ", " (map quote variables);
usePlural = variables != [(builtins.head variables)];
plural = optionalString usePlural "s";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty cute.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we’re spelling lib.length variables != 1 like that…?

@philiptaron
Copy link
Contributor

philiptaron commented Aug 18, 2024

You can also see that it breaks ofBorg eval.

https://gist.githubusercontent.com/GrahamcOfBorg/3aec07891449c7d3d62181cfae4b21ff/raw/522dadac8ff8658e329384e5f04f0824f677accc/Output%2520path%2520comparison

That might mean that effectively this is an error, at least within nixpkgs.

@emilazy
Copy link
Member

emilazy commented Aug 18, 2024

Yes, ofborg doesn’t like warnings. We have to fix in‐tree users first.

Re: Python packages, pytestFlagsArray seems much more common than pytestFlags. I don’t know why.

@philiptaron

This comment was marked as outdated.

@philiptaron
Copy link
Contributor

This is actually quite a lot 😳

@emilazy
Copy link
Member

emilazy commented Aug 18, 2024

Now imagine all the derivations that aren’t in Nixpkgs :)

For pytestFlagsArray/unittestFlagsArray – someone said that the python setup code specifically makes it work? Can we check whether that’s true and maybe skip the error for it if so? Do those derivations trigger the warning in the Bash?

@emilazy
Copy link
Member

emilazy commented Aug 18, 2024

    args+=" ${pytestFlagsArray[@]}"

That’s not quite…

Eh, whatever.

@wolfgangwalther
Copy link
Contributor

Here's the set of attrNames to burn down:

I'll start working on all the non-python ones first.

@wolfgangwalther
Copy link
Contributor

This is a false-positive. checkFlagsArray is used in bash code here, so that's fine. There are probably a lot more of those in the list.

@wolfgangwalther
Copy link
Contributor

For pytestFlagsArray/unittestFlagsArray – someone said that the python setup code specifically makes it work? Can we check whether that’s true and maybe skip the error for it if so? Do those derivations trigger the warning in the Bash?

Those would not trigger the warning in bash, because we are not using concatTo there, yet. I will also not touch python in my follow up PR with all the other setup hooks, yet, exactly because of this - it already has some code dealing with those things, so I'll look at this after all the other setup hooks are done.

@emilazy
Copy link
Member

emilazy commented Aug 18, 2024

Given #335110 (review), it seems like we can special‐case pytestFlagsArray and unittestFlagsArray here and the release channel should be fine given the sudo fix?

@wolfgangwalther
Copy link
Contributor

wolfgangwalther commented Aug 18, 2024

and the release channel should be fine given the sudo fix?

I'm not sure about that, yet. There are more cases where *Array had been used for the ability to pass whitespace. I'll need to look into those first, it could very well be that we have more than just sudo broken right now.

Edit: Ah, of course, we have the fallback to the old behavior already. So yes, of course, all should be good right now.

@emilazy
Copy link
Member

emilazy commented Aug 18, 2024

Right, I just mean in terms of what @philiptaron’s eval showed up on the Nix warning side :)

@philiptaron
Copy link
Contributor

Here's the actual warnings, after my evidently error-prone searches to find their root causes.

https://gist.github.com/philiptaron/c2335eab92e5f0b2b14438aa95edb6d9

@emilazy
Copy link
Member

emilazy commented Aug 18, 2024

Here’s the non‐Python ones:

trace: Package sudo-1.9.15p5 in /ofborg/checkout/2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-2/pkgs/tools/security/sudo/default.nix:77 The variable "configureFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set, continuing anyway.
trace: Warning while evaluating appindicator-sharp-5a79cde93da6d68a4b1373f1ce5796c3c5fe1b37: «unstructured-arrays»: The variable "installFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating bonmin-1.8.9: «unstructured-arrays»: The variable "configureFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating cargo-cache-0.8.3: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating fac-build-0.5.4: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating intermodal-0.1.13: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating janus-gateway-1.2.3: «unstructured-arrays»: The variable "makeFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating keytar-7.9.0: «unstructured-arrays»: The variable "npmFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating monolith-2.8.1: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating oculante-0.8.22: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating php-apcu-5.1.23: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating sacd-19.7.16.37: «unstructured-arrays»: The variable "makeFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating scalapack-2.2.1: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating sudo-1.9.15p5: «unstructured-arrays»: The variable "configureFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating uvccapture-0.5: «unstructured-arrays»: The variable "makeFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating warmux-unstable-2017-10-20: «unstructured-arrays»: The variable "configureFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating webkit2-sharp-a59fd76dd730432c76b12ee6347ea66567107ab9: «unstructured-arrays»: The variable "installFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating xmoji: «unstructured-arrays»: The variable "makeFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating xr-hardware-1.1.1: «unstructured-arrays»: The variable "installFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set

@emilazy
Copy link
Member

emilazy commented Aug 18, 2024

npmFlagsArray may also be fine for now for similar reasons.

@SomeoneSerge
Copy link
Contributor Author

using *Array in nix code (with or without structured attrs, really...) is not what this was intended for [emphasis added]

I'm not sure I fully understand the sentiment: with __structuredAttrs I read *Array variables in Nix as initial values for the hooks, which is maybe not as cool as immutable values, but is valid

pytestFlagsArray seems much more common than pytestFlags. I don’t know why.

The hook is funny indeed (let's get rid of this non-sense too), but yeah we literally have the Nixpkgs manual saying "use pytestFlagsArray, here's a code example", and I'm pretty sure I can find examples in Nixpkgs where pytestFlagsArray would contain backslash-escaped spaces...


I haven't touched anything over the weekend, but I agree with the plan formed above: we fix in-tree users by upgrading them to __structuredAttrs or by exception, introduce a warning with the "will become an error" phrasing, and schedule a hard error.

@SomeoneSerge
Copy link
Contributor Author

Also a sentiment: I think we have only very limited tools for overriding the behaviour of check-meta.nix (basically, the various allowXPredicates) and of setup.sh, so I'd be wary of changing the meaning of old APIs or of removing over warning. With all the legacy crap in place I can take a modern day Nixpkgs and callPackage an ancient pytorch (fill in the name) expression and it'll take only so much pain to get it to work. I like that. I think the "breaking willy-nilly" post elaborates this well, if you ignore the attacks. Just that nobody will pay for the chore of maintaining this ugly mess, so we've little choice but to prune and keep it clean

@emilazy
Copy link
Member

emilazy commented Aug 18, 2024

If we default to __structuredAttrs the broken stuff will start working again, to some extent, at least.

@SomeoneSerge
Copy link
Contributor Author

If we default to __structuredAttrs the broken stuff will start working again, to some extent, at least

Except the stuff that manually \-escaped whitespaces, which we'll break 😅

@emilazy
Copy link
Member

emilazy commented Aug 18, 2024

Yeah, I don’t know… out‐of‐tree derivations always felt like a bit of an awkward case to me and it’s hard to keep stuff working when we don’t have any visibility into it. Keeping old Nixpkgs trees themselves running is one thing but there are lots of things that can break an existing derivation if you try to mix it into a newer Nixpkgs than it was made for. Like, every backwards‐incompatible library update we ever do. We should warn about this stuff but I don’t think we can maintain perfect backwards compatibility with every out‐of‐tree derivation forever. Every treewide change we have to make is something that probably breaks somebody’s package.

@SomeoneSerge
Copy link
Contributor Author

SomeoneSerge commented Aug 18, 2024

out‐of‐tree derivations always felt like a bit of an awkward case to me and it’s hard to keep stuff working when we don’t have any visibility into it

Yeah about that specifically, I think we're under no obligation wrt out-of-tree, and it's just the good will if we're averse to surprising and disruptive changes. There's currently just one "channel" for out-of-tree projects to cast light on themselves and prevent nixpkgs changes that negatively affect them: direct participation, investing human hours in nixpkgs discussions and maintenance. Idk if this can be improved, but it's not unreasonable

@emilazy
Copy link
Member

emilazy commented Aug 18, 2024

Right. I think warning for 24.11 and removing the hack in 25.05 is more generous to out‐of‐tree users than a lot of breaking changes we make are.

@wolfgangwalther
Copy link
Contributor

using *Array in nix code (with or without structured attrs, really...) is not what this was intended for [emphasis added]

I'm not sure I fully understand the sentiment: with __structuredAttrs I read *Array variables in Nix as initial values for the hooks, which is maybe not as cool as immutable values, but is valid

My point about the "with structuredAttrs" case is: When you have structuredAttrs, you can just use the non-Array variants with the same result. They are treated as arrays, too. So you don't need *Array anymore.

Take the example where we fixed sudo to use structuredAttrs. The fix still left the option with the trailing whitespace in configureFlagsArray, but it doesn't need to. It can be joined with configureFlags now, no need for *Array anymore. (I'll have a commit for that)

So with structuredAttrs, *Array is redundant. Without, it's not doing what you'd think it does and is currently only a "preserve whitespace" hack.

@emilazy
Copy link
Member

emilazy commented Aug 19, 2024

Then perhaps we should warn about using these variables regardless of __structuredAttrs?

@wolfgangwalther
Copy link
Contributor

Here’s the non‐Python ones:

trace: Package sudo-1.9.15p5 in /ofborg/checkout/2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-2/pkgs/tools/security/sudo/default.nix:77 The variable "configureFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set, continuing anyway.
trace: Warning while evaluating appindicator-sharp-5a79cde93da6d68a4b1373f1ce5796c3c5fe1b37: «unstructured-arrays»: The variable "installFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating bonmin-1.8.9: «unstructured-arrays»: The variable "configureFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating cargo-cache-0.8.3: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating fac-build-0.5.4: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating intermodal-0.1.13: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating janus-gateway-1.2.3: «unstructured-arrays»: The variable "makeFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating keytar-7.9.0: «unstructured-arrays»: The variable "npmFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating monolith-2.8.1: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating oculante-0.8.22: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating php-apcu-5.1.23: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating sacd-19.7.16.37: «unstructured-arrays»: The variable "makeFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating scalapack-2.2.1: «unstructured-arrays»: The variable "checkFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating sudo-1.9.15p5: «unstructured-arrays»: The variable "configureFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating uvccapture-0.5: «unstructured-arrays»: The variable "makeFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating warmux-unstable-2017-10-20: «unstructured-arrays»: The variable "configureFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating webkit2-sharp-a59fd76dd730432c76b12ee6347ea66567107ab9: «unstructured-arrays»: The variable "installFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating xmoji: «unstructured-arrays»: The variable "makeFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set
trace: Warning while evaluating xr-hardware-1.1.1: «unstructured-arrays»: The variable "installFlagsArray" will be misinterpreted as single element bash array because __structuredAttrs is not set

All of them removed in #335925.

@wolfgangwalther
Copy link
Contributor

Then perhaps we should warn about using these variables regardless of __structuredAttrs?

Yes, possibly with some hint about "you probably wanted to do X instead".

@xaverdh
Copy link
Contributor

xaverdh commented Aug 20, 2024

while reading this I thought maybe we should update the nixpkgs manual to suggest __structuredAttrs instead of the *Array variants for dealing with spaces?

@mweinelt
Copy link
Member

@ofborg eval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: stdenv Standard environment 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 12.approvals: 1 This PR was reviewed and approved by one reputable person awaiting_changes (old Marvin label, do not use)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants