I'm trying to get a grasp of how packages / library dependencies work in racket. I'm going through documentation, however a few pieces are still puzzling.
Let's say I'm trying to develop two different racket projects, each one with their own set of dependencies. There may be a few packages required by both the projects, but the versions may differ. The following are the questions I'm trying to find answers for:
-
How do I declare dependencies for each of my projects?
The answer is, I can list my dependencies ininfo.rkt
, and useraco
to install them. (However, this wasn't apparent when glancing through the documentation.) -
How do I specify versions for my dependencies?
info.rkt
does seem to support version constraints, but the feature doesn't seem to be used widely. I checkedinfo.rkt
of many packages in https://pkgs.racket-lang.org/, they list dependencies without version numbers. Am I missing something here? -
Where do the packages get installed and how different versions are managed?
From what I understood so far, raco installs packages to either a system level or a user level directory. How does it work for different projects requiring different version of the same package? Is there a python virtual-environment kind of concept here? (or because each version has a different hash, one central location (user/system level) works fine for all projects?)
Thanks for the responses in advance. I would appreciate if any one can point to a quick Getting Started kind of tutorial regarding project setup, deps, development cycle.