Skip to content

Commit

Permalink
generic fetcher: Lift experimental status
Browse files Browse the repository at this point in the history
Generic fetcher is now an officially supported part of cachi2.
`--dev-package-managers` flag is no longer needed.

Signed-off-by: Jan Koscielniak <[email protected]>
  • Loading branch information
kosciCZ committed Nov 14, 2024
1 parent f37b120 commit 5ebe736
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ Supported:
* [npm](#npm)
* [yarn](#yarn)
* [bundler](#bundler)

Experimental:

* [generic fetcher](#generic-fetcher)

Planned:
Expand Down Expand Up @@ -248,8 +245,7 @@ With the generic fetcher, you can easily fetch those files with Cachi2 along wit
satisfy the hermetic build condition and have them recorded in the SBOM.

Cachi2 uses a simple custom lockfile named `generic_lockfile.yaml` that is expected to be present in the repository. The
lockfile describes the urls, checksums and target locations for the downloaded files. The generic fetcher is currently an
experimental feature, so cachi2 has to be run with `--dev-package-managers` flag.
lockfile describes the urls, checksums and target locations for the downloaded files.

See [docs/usage.md](docs/usage.md#pre-fetch-dependencies-generic-fetcher) for more details.

Expand Down
2 changes: 1 addition & 1 deletion cachi2/core/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"npm": npm.fetch_npm_source,
"pip": pip.fetch_pip_source,
"yarn": yarn.fetch_yarn_source,
"generic": generic.fetch_generic_source,
}

# This is where we put package managers currently under development in order to
# invoke them via CLI
_dev_package_managers: dict[PackageManagerType, Handler] = {
"rpm": rpm.fetch_rpm_source,
"yarn-classic": yarn_classic.fetch_yarn_source,
"generic": generic.fetch_generic_source,
}

# This is *only* used to provide a list for `cachi2 --version`
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ is assumed to be `.`. Since generic fetcher is still an experimental feature, it
enabled with the `--dev-package-managers` flag.

```
cachi2 fetch-deps --source ./cachi2-generic --output ./cachi2-output generic --dev-package-managers
cachi2 fetch-deps --source ./cachi2-generic --output ./cachi2-output generic
```

#### Build the application image (generic fetcher)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
repo="https://github.com/cachito-testing/cachi2-generic",
ref="test-file-not-reachable",
packages=({"path": ".", "type": "generic"},),
flags=["--dev-package-managers"],
check_output=False,
check_deps_checksums=False,
check_vendor_checksums=False,
Expand Down

0 comments on commit 5ebe736

Please sign in to comment.