Make dependency resolution and analysis optional AND allow specifying the dep depth through CLI #838
Closed
11 tasks done
Labels
cli
related to the Command-line Interface
Description
We have agreed that it's better to have dependency resolution optional for various reasons:
In additions, we also want to let the user, if they want to enable automatic dependency resolution, specify the depth of dependency resolution (right not we only support 1. direct dependencies and 2. all transitive dependencies).
Solution
We will make dependency resolution and analysis off by default. If the user want to run dependency resolution, they must provide an additional flag.
The
--skip-deps
flag will still be left in the command line interface of Macaron, however, enabling it will not do anything, except printing out a DEPRECATED message. This flag will be completely removed after the next Macaron release (v0.13.0).The addition flag will be called
--deps-depth
. This flag accepts a value that specify the depth level of dependencies.:1
means direct dependencies0
means no dependency resolutioninf
means all transitive dependenciesIn theory, we could accept any whole number as the value (e.g.
2
,3
, etc.) if need arises in the future.Tasks
--skip-deps
do nothing.--skip-deps
is used.--skip-deps
from existing test casesmacaron/docs/source/pages/tutorials/detect_malicious_package.rst
Lines 182 to 187 in ac8de70
--deps-depth
for SBOM deps resolution to work.--deps-depth=0
, no dependency resolution is run even if an SBOM is provided,--deps-depth=1
to all test cases that require direct dependency resolution--deps-depth=inf
to all test cases that require transitive dependency resolution--deps-depth
recursive
option in[dependency.resolver]
indefaults.ini
The text was updated successfully, but these errors were encountered: