Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'cargo update' fails for dependencies sourced from github hash revisions #15020

Open
yurivict opened this issue Jan 6, 2025 · 3 comments
Open
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.

Comments

@yurivict
Copy link

yurivict commented Jan 6, 2025

Problem

In the FreeBSD ports framework cargo update is routinely run as one of the build steps.

cargo update fails for ports when Cargo.lock contains source= entries for GitHub revisions.

Testcase: https://github.com/GreptimeTeam/greptimedb v0.11.2.

Cargo.lock there contains:

[[package]]
name = "meter-core"
version = "0.1.0"
source = "git+https://github.com/GreptimeTeam/greptime-meter.git?rev=a10facb353b41460eeb98578868ebf19c2084fac#a10facb353b41460eeb98578868ebf19c2084fac"
dependencies = [
 "anymap2",
 "once_cell",
 "parking_lot 0.12.3",
]

which causes cargo update to fail:

$ /usr/local/bin/cargo update  --manifest-path /usr/ports/databases/greptimedb/work/greptimedb-0.11.2/Cargo.toml --verbose

error: failed to load manifest for workspace member `/usr/ports/databases/greptimedb/work/greptimedb-0.11.2/src/api`
referenced by workspace at `/usr/ports/databases/greptimedb/work/greptimedb-0.11.2/Cargo.toml`

Caused by:
  failed to load manifest for dependency `common-base`

Caused by:
  failed to load manifest for dependency `common-macro`

Caused by:
  failed to load manifest for dependency `common-query`

Caused by:
  failed to load manifest for dependency `store-api`

Caused by:
  failed to load manifest for dependency `common-meta`

Caused by:
  failed to load manifest for dependency `common-grpc-expr`

Caused by:
  failed to load manifest for dependency `table`

Caused by:
  failed to load manifest for dependency `common-datasource`

Caused by:
  failed to load manifest for dependency `object-store`

Caused by:
  failed to load manifest for dependency `common-test-util`

Caused by:
  failed to load manifest for dependency `client`

Caused by:
  failed to load manifest for dependency `query`

Caused by:
  failed to parse manifest at `/usr/ports/databases/greptimedb/work/greptimedb-0.11.2/src/query/Cargo.toml`

Caused by:
  dependency (meter-macros) specified without providing a local path, Git repository, version, or workspace dependency to use

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version


@yurivict yurivict added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Jan 6, 2025
@weihanglo
Copy link
Member

Could you provide the version of cargo you used? The output of cargo -vV might be good enough.

@yurivict
Copy link
Author

yurivict commented Jan 6, 2025

$ cargo -vV 
cargo 1.84.0-nightly (031049782 2024-11-01)
release: 1.84.0-nightly
commit-hash: 0310497822a7a673a330a5dd068b7aaa579a265e
commit-date: 2024-11-01
host: x86_64-unknown-freebsd
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.11.1 (sys:0.4.74+curl-8.9.0 system ssl:OpenSSL/3.0.15)
os: FreeBSD 14.2-STABLE [64-bit]

@epage
Copy link
Contributor

epage commented Jan 6, 2025

Testcase: https://github.com/GreptimeTeam/greptimedb v0.11.2.

I cloned that repo and ran cargo update without a problem. Are there additional reproduction steps needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

3 participants