Hey, first off thanks for mama. It quietly does a ton of work across our repos and mostly just gets out of the way, which is exactly the point.
Ran into a head-scratcher today and I think it comes down to one small spot in package.py, so I wanted to jot it down while it's fresh.
I ended up with a dependency whose static lib never actually got built (partly our fault, a stale build dir on our side). The thing is, mama's export step noticed the lib was missing but just logged it and carried on:
# mama/package.py, export_lib()
else:
console(f'export_lib failed to find: {path}')
So the package reported as exported/deployed just fine, everything looked green, and the build happily went on to compile our whole app. It only fell over at the very end, at the final link, with a big pile of undefined symbols. That took a good while to trace back to the one missing .a from way earlier.
What bit me is that it's non-fatal: a target that is told to export libFoo.a but can't find libFoo.a still counts as a success, and the real failure shows up minutes later and a repo away, where it's much harder to connect back to the cause.
One small idea, if you think it's worth it: treat a missing export_lib as an error right there (or mark the target as not-actually-built so it rebuilds next pass), instead of a console warning. If some targets legitimately export optional libs, maybe an opt-in required=True on export_lib would keep both behaviours.
Nothing urgent, and I fully expect there's some history here I'm not seeing. Just figured a quick heads up might save the next person the same evening I had. Thanks again, it's a genuinely handy tool.
(Seen with mama 0.12.10; the same export_lib shape is in current main too.)
Hey, first off thanks for mama. It quietly does a ton of work across our repos and mostly just gets out of the way, which is exactly the point.
Ran into a head-scratcher today and I think it comes down to one small spot in
package.py, so I wanted to jot it down while it's fresh.I ended up with a dependency whose static lib never actually got built (partly our fault, a stale build dir on our side). The thing is, mama's export step noticed the lib was missing but just logged it and carried on:
So the package reported as exported/deployed just fine, everything looked green, and the build happily went on to compile our whole app. It only fell over at the very end, at the final link, with a big pile of undefined symbols. That took a good while to trace back to the one missing
.afrom way earlier.What bit me is that it's non-fatal: a target that is told to export
libFoo.abut can't findlibFoo.astill counts as a success, and the real failure shows up minutes later and a repo away, where it's much harder to connect back to the cause.One small idea, if you think it's worth it: treat a missing
export_libas an error right there (or mark the target as not-actually-built so it rebuilds next pass), instead of a console warning. If some targets legitimately export optional libs, maybe an opt-inrequired=Trueonexport_libwould keep both behaviours.Nothing urgent, and I fully expect there's some history here I'm not seeing. Just figured a quick heads up might save the next person the same evening I had. Thanks again, it's a genuinely handy tool.
(Seen with mama 0.12.10; the same
export_libshape is in currentmaintoo.)