diffcone.toml¶
Some dependencies can't be seen in the code: a plugin registered through
entry points, a handler named in a configuration file, a registry filled
when a module is imported. Declare them in a diffcone.toml file at the
root of your repository:
[[edges]]
from = "pkg.registry.dispatch"
to = "pkg.handlers.json_handler"
why = "handlers register themselves through entry points"
[[edges]]
from = "pkg.cli"
to = "pkg.plugins"
Each [[edges]] entry says that from depends on to. A change to to
then selects every target that reaches from, and the report explains the
selection with your why.
| Key | Description |
|---|---|
from |
Required. The code that depends on something: a function, method, class or module, by its import path. A class or module includes everything defined in it. |
to |
Required. What it depends on, named the same way. |
why |
Optional. A short explanation, shown in the report. |
Declarations can only add dependencies, so they can only make diffcone select more tests, never fewer.
diffcone reads the file from both snapshots, so it changes along with your code. A declaration that names something that doesn't exist, an unknown key, or a file that doesn't parse is reported as an analysis error: the plan then selects every target, so a typo can't silently remove tests from a plan. A declaration between two very large modules (more than 5,000 pairs of symbols) is also an error; declare the specific functions instead.