Commit Graph

4 Commits

Author SHA1 Message Date
Randy Eckenrode f71ca2825c Fix test failures on Darwin on a case-sensitive fs
This issue was encounetered while working on a contribution to nixpkgs.
Nix allows the store to be installed on a separate, case-sensitive APFS
volume. When the store is on a case-sensitive volume, these tests fail
because they try to use `foundation` instead of `Foundation`.
2023-05-28 01:51:59 -04:00
Eli Schwartz 8fc4649bfe
propagate the most accurate node to error messages
During evaluation of codeblocks, we start off with an iteration of
nodes, and then while evaluating them we may update the global
self.current_node context. When catching and formatting errors, we
didn't take into account that the node might be updated from the
original top-level iteration.

Switch to formatting errors using self.current_node instead, to ensure
we can point at the likely most-accurate actual cause of an error.

Also update the current node in a few more places, so that function
calls always see the function call as the current node, even if the most
recently parsed node was an argument to the function call.

Fixes #11643
2023-04-04 15:06:17 -04:00
Eli Schwartz 719dd0d2a0
dependencies: log the real reason for a dependency lookup failing
In the debug logs, always log if a dependency lookup raises a
DependencyException. In the `required: false` case, this information
would otherwise disappear forever, and we would just not even log that
we tried it -- it doesn't appear in "(tried x, y and z)".

In the `required: true` case, we would re-raise the first exception if
it failed to be detected. Update the raise message with the same
information we print to the debug logs, indicating which dependency and
which method was used in the failing attempt.
2022-09-12 19:16:59 -04:00
Jussi Pakkanen 1c3191be55 Condense test directory names. 2022-03-29 02:12:02 +03:00