tembo-io / trunk

Package manager and registry for Postgres extensions
PostgreSQL License
240 stars 16 forks source link

cli(install): in dep. res., look up Trunk project from extension name #673

Closed vrmiguel closed 5 months ago

vrmiguel commented 5 months ago

For example: vectorize states a dependency on pgvector on its control file. Trunk currently fails to install pgvector since it's extension name is vector.

This PR aims to fix that by looking up Trunk project names from their extension names whenever necessary.

Example of installing vectorize now:

Using pkglibdir: "/usr/lib/postgresql"
Using sharedir: "/usr/share/postgresql"
Using Postgres version: 16
info: Downloading from: https://cdb-plat-use1-prod-pgtrunkio.s3.amazonaws.com/extensions/vectorize/vectorize-pg16-0.12.1.tar.gz
info: Dependent extensions to be installed: ["pg_cron", "pgmq", "vector"]
info: Dependency vector not found in sharedir "/usr/share/postgresql". Installing...
info: Downloading from: https://cdb-plat-use1-prod-pgtrunkio.s3.amazonaws.com/extensions/pgvector/pgvector-pg16-0.6.0.tar.gz

...

--no-deps flag

Performs an install without performing dependency resolution. Example output:

warn: Skipping dependency resolution! 3 dependencies are unmet.
aws-amplify-us-east-1[bot] commented 5 months ago

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-673.d2qgksbj4k37j8.amplifyapp.com