[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A test suite that use a lib
From: |
Nala Ginrut |
Subject: |
Re: A test suite that use a lib |
Date: |
Sun, 02 May 2021 12:20:46 +0800 |
User-agent: |
mu4e 1.4.15; emacs 27.2 |
Hi Jérémy and Motimer!
I suggest you always put your libraries and 3rd-party libraries into
"lib" directory. Because there will be an application based pkg-manager
added in the future, according to my plan. The local lib is the way to
keep it hygiine.
I was planing to write my own pkg-manager, but few years ago, Ludo (one
of the authors of Guix) had discussed with me, it's better to take
advantage of Guix as possible.
However, I still don't have time to think about this plan. But put
libraries into "lib" is a good habit to prevent issues in the future.
Best regards.
Jérémy Korwin-Zmijowski writes:
> Hello Mortimer and Nala !
>
> Thank you for helping on this.
> Actually, I successfuly created and used my lib. I can call its public
> procedures from a controller. It's all fine.
>
> My point is to write and run tests for my lib.
>
> I thought I could add my Artanis app folder in the Guile's load path.
> It felt intuitive to me. (the following command is run at the root of
> my Artanis app)
>
> $ ls
> app/ conf/ db/ ENTRY guix.scm lib/ log/ prv/ pub/ README sys/
> test/ tmp/
> $ guile -L . test/unit/ingredients-test.scm
>
> I get the following error :
>
> no code for module (ynm ingredients)
>
> In fact, what I need to run is:
>
> guile -L lib/ test/unit/ingredients-test.scm
>
> It's because Artanis puts third party libs in lib/ but defines it as
> (my-app my-lib) instead of (lib my-app my-lib). So Guile can't find it
> at the root of an Artanis app.
>
> Finally it was not really a big deal, the solution for my problem was
> pretty straight forward. haha
> At least Mortimer learned something, I'm glad. ;)
>
> Take care,
> Jérémy
--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058
signature.asc
Description: PGP signature