The upcoming Nim version will ship with the Atlas "package cloner" tool.

Atlas provides an isolated workspace where you can manage projects and their 
dependencies effortlessly.

## Key Concepts

  1. Workspaces: Each workspace is completely isolated, ensuring no sharing of 
resources. To create a workspace in your current directory, simply use the 
command atlas init.
  2. Projects: A workspace can contain one or multiple projects. Projects can 
easily interact with each other, enabling seamless development of multiple 
projects simultaneously.
  3. Dependencies: Inside a workspace, dependencies are stored in the _deps 
(name is configurable) directory. Moving a dependency to a higher level turns 
it into a project, and vice versa. The only distinction between a project and a 
dependency is their location, and project always takes priority during 
dependency resolution.



## No Magic

Atlas provides a transparent approach to package management. It manages two 
important files, `project.nimble` and `nim.cfg`, without interfering with any 
untouched configurations.

## Commands Supported:

`Use <url> / <package name>`: Clone a package and its dependencies into the 
_deps directory, making it accessible to your current project. Atlas 
automatically handles the configuration of the necessary files, such as 
$project.nimble and nim.cfg, simplifying the import process.

`Clone/Update <url> / <package name>`: Clone a URL and its dependencies 
recursively into the workspace. The nim.cfg file is created or patched with the 
required --path entries.

`Search <term term2 term3 ...>`: Search the package index packages.json for 
packages that match the given terms in their description, name, or tags. Also 
searches github directly because many packages are never registered in 
packages.json.

`Install <proj.nimble>`: Use the specified .nimble file to set up the project's 
dependencies.

`UpdateProjects / updateDeps [filter]`: Update all projects or dependencies in 
the workspace that have a matching remote URL based on the provided filter. 
Updates are only performed when there are no uncommitted changes.

`tag <version>`: Tag and publish a new version.

## Work in progress

Atlas is in the early stages of development. As a result, not all packages are 
currently compatible with it. Atlas installs the _minimal_ required version of 
a package. This information is extracted from the Nimble file and is wrong more 
often than it is correct because nobody checks this. Additionally, Atlas relies 
on GitHub tags to detect versions, which means that if tags are missing, the 
proper version cannot be selected.

## Open design questions

  * How to provide a URL override mechanism so that private closed source git 
repositories can be accessed too. Currently it is only supported by depending 
on a URL rather than a package name which is inconvenient.
  * How to provide a "build docs/tests" feature. Currently it simply delegates 
to Nimble for this. But Nimble delegates to the Nim compiler so we could cut 
out the middle-man.
  * How to deal with Nimble's post install hooks etc. Currently these are 
simply ignored.
  * How to integrate it with a "virtual Nim environment" feature.



I fear that most of these questions have no clean solution because Atlas is 
fundamentally not a build tool. Its only job is to setup a `nim.cfg`, the Nim 
compiler should be called manually afterwards.

Reply via email to