Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Mar 12, 2024
1 parent a1c273b commit e385b21
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/src/toml-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,21 @@ constraints in detail. It is also possible to list constraints on `julia` itself
julia = "1.1"
```

### The `[subprojects]` section

A (base) project can contain multiple "subprojects," each of which is represented by a folder within the same directory as the base project. These subprojects have their own project files, similar to the base project file, allowing them to include their own dependencies, compatibility information, and even function as full packages.

Subprojects are defined in the base project file using a list of folder names, like so:

```toml
subprojects = ["test", "docs", "benchmarks", "PrivatePackage"]
```

In a subproject, any script can use both its own declared dependencies and those of the base project. However, if the subproject is a package, it is restricted to using only the dependencies defined in its project file.

When the package manager resolves dependencies, it considers the requirements of both the base project and its subprojects. The compatible versions identified during this process are recorded in a single manifest file located next to the base project file.

This structure is particularly beneficial for developers using a monorepo approach, where a large number of unregistered packages may be involved. It's also useful for adding documentation or benchmarks to a package by including additional dependencies beyond those of the package itself.

## `Manifest.toml`

Expand Down

0 comments on commit e385b21

Please sign in to comment.