dear-imgui.hs icon indicating copy to clipboard operation
dear-imgui.hs copied to clipboard

shared lib

Open Drezil opened this issue 2 years ago • 7 comments

this also bundles the c-parts and the generated inline-library for dynamic linking in sub-projects.

Minor caveat: Setup.hs line 14 still needs a dynamic compiler-version-string to vendor the right .so in the right directories.

After that change this could be merged without problems.

Drezil avatar Jul 20 '22 23:07 Drezil

@dpwiz i have no idea why the nix-build in the github-actions fails.. because (and i don't use nix) locally with cabal for me both .a and -ghc8.10.7.so are in the dist-directory after building. Do you have a clue?

Drezil avatar Jul 21 '22 23:07 Drezil

Ah.. i now have recreated the error locally.

Seems like cabal new-clean & rm -rf dist-newstyle is not enough to clean everything because there are things cached in the submodules as well.. i will work on a fix & report back ;)

Drezil avatar Jul 22 '22 16:07 Drezil

Now i understand.

cabal build & cabal exec work flawlessly. But cabal install can't find the file to vendor it, because it is in the "lib" directory. Thats what the Setup.hs would fix with the cp.

I only used cabal build & cabal exec in my tests & had no problems. But the nix-script uses cabal install & that fails.

Trying that stuff now.

Drezil avatar Jul 22 '22 17:07 Drezil

It finally works with the right incantation. I could even continue to use build-type: Simple instead of Custom.

Thing i did: i merged the internal-library into the main library so build-types are switchable. But nothing is visible from the outside, because all those modules do not get exposed & just listed.

Drezil avatar Jul 22 '22 23:07 Drezil

Have you found another workaround?

dpwiz avatar Aug 08 '22 18:08 dpwiz

oh .. 😅 .. i thought this was already merged ...

Drezil avatar Aug 08 '22 18:08 Drezil

FTR: I would like to merge this (or something like it), but I don't quite understand the effects of such shuffle on packaging. Running the examples on Nix, Windows and Macs may help with the confidence.

dpwiz avatar Aug 09 '22 09:08 dpwiz