ref: 9369e24bf0f65400bd280575ea2d30feef3d4ba9
parent: 7f4fa088626c24ac74cdfccab82a3d588ef34be6
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Aug 25 06:08:05 EDT 2017
Print the directory where we found the bad lib.
--- a/mbld/libs.myr
+++ b/mbld/libs.myr
@@ -53,15 +53,15 @@
(f, dir) = openlib(lib, incs)
match bio.getc(f)
| `bio.Ok 'U': /* ok */
- | `bio.Ok _: std.fput(1, "{}: not a usefile\n", lib)
- | `bio.Err e: std.fatal("{}: error reading: {}\n", lib, e)
- | `bio.Eof: std.fatal("{}: truncated\n", lib)
+ | `bio.Ok _: std.fput(1, "{}/{}: not a usefile\n", dir, lib)
+ | `bio.Err e: std.fatal("{}/{}: error reading: {}\n", dir, lib, e)
+ | `bio.Eof: std.fatal("{}/{}: truncated\n", dir, lib)
;;
match bio.getbe32(f)
| `bio.Ok Abiversion: /* nothing: version matches. */
- | `bio.Ok v: std.fput(1, "{}: mismatched abi {}\n", lib, v)
- | `bio.Err e: std.fatal("{}: error reading: {}\n", lib, e)
- | `bio.Eof: std.fatal("{}: truncated\n", lib)
+ | `bio.Ok v: std.fput(1, "{}/{}: mismatched abi {}\n", dir, lib, v)
+ | `bio.Err e: std.fatal("{}/{}: error reading: {}\n", dir, lib, e)
+ | `bio.Eof: std.fatal("{}/{}: truncated\n", dir, lib)
;;
std.slfree(rdstr(f))