Open nomeata opened 5 years ago
Ah wow, sorry about that! Yes, we should make it more debuggable, and I do wonder if there's a better way to do it. Maybe we can write a Haskell script that parses the file with cabal, mangles it, and then produces the new version with cabal?
You could probably use a multi-line regex to match on the header for executable
and the indent of the next non-empty line, and use that. Still fragile and hacky, but pushes the line a bit further.
I was just staring at an odd error
and it took me some sleuthing to find out that there is a sed script in https://github.com/reflex-frp/reflex-platform/blob/04672fbd55bb6d97d4efcc3657af9f4bc0d1215d/android/impl.nix#L4 that only works if the executable section is indented by two spaces (I had four).
Not sure what an easy solution is. But maybe add an
echo
after the sed saying “Mangling .cabal file to produce android libraries” so leave a breadcrumb for debugging.