chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to track and isolate project dependencies?


From: Evan Hanson
Subject: Re: Best way to track and isolate project dependencies?
Date: Fri, 11 Sep 2020 15:37:15 +1200

Hi Lassi,

I mostly do what Alice says, using egg files to manage builds regardless
of whether the software will be released as an egg, just to benefit from
chicken-install's smarts about compiler flags and so on. So, to answer
your second question, yes the eggs facility can be used to track
dependencies in development just as well as for release. (Note that
non-egg dependencies such as C libraries are out of scope for
chicken-install, so for that you'll need some other tool.)

To your first point about dependency isolation, I sometimes use direnv
[1] alongside a tool I wrote [2] to install CHICKEN into each project's
directory and use that version whenever I'm working on it. It works a
bit like venv in the end, but I don't have to remember to activate it:

    # install chicken into a local directory
    $ dust install 5.2.0 ./chicken

    # configure direnv to put that chicken on the path
    $ cat .envrc
    PATH_add "$(pwd)/chicken/bin"

    # run chicken-install with -no-install to install dependencies and
    # build the software (defined by a local egg file)
    $ chicken-install -n

This gives you control over the CHICKEN version as well as eggs. If you
didn't care about that you could also have direnv manage just
CHICKEN_INSTALL_REPOSITORY and CHICKEN_REPOSITORY_PATH, I just find it
easier to think about this as an all-or-nothing thing.

Note there is also cenv [3] which can isolate eggs for your project by
shuffling environment variables as well, but I haven't tried it.

Cheers,

Evan

[1]: https://direnv.net/
[2]: https://git.sr.ht/~evhan/dust
[3]: https://github.com/ursetto/cenv



reply via email to

[Prev in Thread] Current Thread [Next in Thread]