-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[configurator] Return pkg-config error to clients of new query API.
It is very convenient for configuration tools to be able to provide a better error message to the user when pkg-config fails. This was suggested by @garrigue. We take advantage of the newly [undocumented] API in 1.7.2 to modify its return type, but this could be a problem. If so, we will have to introduce yet another function if we want this functionality. We also update `src/configurator/dune` to include transitive dependencies as suggested by @rgrinberg Signed-off-by: Emilio Jesus Gallego Arias <e+git@x80.org>
- Loading branch information
Showing
5 changed files
with
27 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
test/blackbox-tests/test-cases/pkg-config-quoting/pkg_config.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
(* We'd like to use String.equal but that's OCaml >= 4.03 *) | ||
let not_flag x = not ("--print-errors" = x) | ||
|
||
let () = | ||
let args = List.tl (Array.to_list Sys.argv) in | ||
let args = List.filter not_flag args in | ||
Format.printf "%a@." | ||
(Format.pp_print_list Format.pp_print_string) args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters