<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Cargo package metadata not parsing correctly causing builds to fail]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">A couple of weeks ago I opened an <a href="https://forums.inedo.com/topic/5771/cargo-feed-returning-500-internal-server-error">issue</a> regarding an error with the Cargo feed for the Cargo package <code>libssh2-sys</code> (version <code>0.3.1</code>). This was fixed in Proget 2026.3 but we are now seeing a different (but possibly related) issue with the same package and version.</p>
<p dir="auto">Our cargo build commands are failing again:</p>
<pre><code>$ cargo build
    Updating `cargo-proxy` index
error: failed to select a version for the requirement `libssh2-sys = "^0.3.1"` (locked to 0.3.1)
  version 0.3.1's index entry is invalid
location searched: `cargo-proxy` index (which is replacing registry `crates-io`)
required by package `ssh2 v0.9.5`
    ... which satisfies dependency `ssh2 = "^0.9.5"` (locked to 0.9.5)
</code></pre>
<p dir="auto">After running the command with more verbose logs, we see the following:</p>
<pre><code>1.940501134s DEBUG main:exec:compile_ws:create_bcx:resolve_with_registry:resolve_with_previous:resolve: cargo::sources::registry::http_remote: checking freshness of li/bs/libssh2-sys
1.940513252s DEBUG main:exec:compile_ws:create_bcx:resolve_with_registry:resolve_with_previous:resolve: cargo::sources::registry::index: slow path for "li/bs/libssh2-sys"
1.941615528s  INFO main:exec:compile_ws:create_bcx:resolve_with_registry:resolve_with_previous:resolve: cargo::sources::registry::index: recoverying from failed parse of registry package libssh2-sys@0.3.1: invalid type: null, expected a string at line 1 column 637
</code></pre>
<p dir="auto">I think the <a href="https://github.com/alexcrichton/ssh2-rs/blob/master/libssh2-sys/Cargo.toml#L35-L36" rel="nofollow">metadata</a> for the vcpkg build dependency is not being parsed correctly:</p>
<pre><code>[target.'cfg(target_env = "msvc")'.build-dependencies]
vcpkg = "0.2"
</code></pre>
<p dir="auto">For example, <a href="http://crates.io" rel="nofollow">crates.io</a> parses it as follows:</p>
<pre><code>$ curl -s https://index.crates.io/li/bs/libssh2-sys | jq 'select(.vers == "0.3.1").deps[] | select(.name == "vcpkg")'
{
  "name": "vcpkg",
  "req": "^0.2",
  "features": [],
  "optional": false,
  "default_features": true,
  "target": "cfg(target_env = \"msvc\")",
  "kind": "build"
}
</code></pre>
<p dir="auto">While Proget seems to parse it as follows:</p>
<pre><code>$ curl -s https://${PROGET_URL}/repository/cargo-proxy/li/bs/libssh2-sys | jq 'select(.vers == "0.3.1").deps[] | select(.name | contains("msvc"))'
{
  "name": "cfg(target_env = \"msvc\")",
  "req": null,
  "optional": false,
  "kind": "normal",
  "default_features": true,
  "features": [],
  "registry": "https://github.com/rust-lang/crates.io-index",
  "target": null
}
</code></pre>
]]></description><link>https://forums.inedo.com/topic/5779/cargo-package-metadata-not-parsing-correctly-causing-builds-to-fail</link><generator>RSS for Node</generator><lastBuildDate>Thu, 18 Jun 2026 09:42:14 GMT</lastBuildDate><atom:link href="https://forums.inedo.com/topic/5779.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 17 Jun 2026 06:28:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Cargo package metadata not parsing correctly causing builds to fail on Wed, 17 Jun 2026 06:28:25 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">A couple of weeks ago I opened an <a href="https://forums.inedo.com/topic/5771/cargo-feed-returning-500-internal-server-error">issue</a> regarding an error with the Cargo feed for the Cargo package <code>libssh2-sys</code> (version <code>0.3.1</code>). This was fixed in Proget 2026.3 but we are now seeing a different (but possibly related) issue with the same package and version.</p>
<p dir="auto">Our cargo build commands are failing again:</p>
<pre><code>$ cargo build
    Updating `cargo-proxy` index
error: failed to select a version for the requirement `libssh2-sys = "^0.3.1"` (locked to 0.3.1)
  version 0.3.1's index entry is invalid
location searched: `cargo-proxy` index (which is replacing registry `crates-io`)
required by package `ssh2 v0.9.5`
    ... which satisfies dependency `ssh2 = "^0.9.5"` (locked to 0.9.5)
</code></pre>
<p dir="auto">After running the command with more verbose logs, we see the following:</p>
<pre><code>1.940501134s DEBUG main:exec:compile_ws:create_bcx:resolve_with_registry:resolve_with_previous:resolve: cargo::sources::registry::http_remote: checking freshness of li/bs/libssh2-sys
1.940513252s DEBUG main:exec:compile_ws:create_bcx:resolve_with_registry:resolve_with_previous:resolve: cargo::sources::registry::index: slow path for "li/bs/libssh2-sys"
1.941615528s  INFO main:exec:compile_ws:create_bcx:resolve_with_registry:resolve_with_previous:resolve: cargo::sources::registry::index: recoverying from failed parse of registry package libssh2-sys@0.3.1: invalid type: null, expected a string at line 1 column 637
</code></pre>
<p dir="auto">I think the <a href="https://github.com/alexcrichton/ssh2-rs/blob/master/libssh2-sys/Cargo.toml#L35-L36" rel="nofollow">metadata</a> for the vcpkg build dependency is not being parsed correctly:</p>
<pre><code>[target.'cfg(target_env = "msvc")'.build-dependencies]
vcpkg = "0.2"
</code></pre>
<p dir="auto">For example, <a href="http://crates.io" rel="nofollow">crates.io</a> parses it as follows:</p>
<pre><code>$ curl -s https://index.crates.io/li/bs/libssh2-sys | jq 'select(.vers == "0.3.1").deps[] | select(.name == "vcpkg")'
{
  "name": "vcpkg",
  "req": "^0.2",
  "features": [],
  "optional": false,
  "default_features": true,
  "target": "cfg(target_env = \"msvc\")",
  "kind": "build"
}
</code></pre>
<p dir="auto">While Proget seems to parse it as follows:</p>
<pre><code>$ curl -s https://${PROGET_URL}/repository/cargo-proxy/li/bs/libssh2-sys | jq 'select(.vers == "0.3.1").deps[] | select(.name | contains("msvc"))'
{
  "name": "cfg(target_env = \"msvc\")",
  "req": null,
  "optional": false,
  "kind": "normal",
  "default_features": true,
  "features": [],
  "registry": "https://github.com/rust-lang/crates.io-index",
  "target": null
}
</code></pre>
]]></description><link>https://forums.inedo.com/post/19798</link><guid isPermaLink="true">https://forums.inedo.com/post/19798</guid><dc:creator><![CDATA[joris.guex]]></dc:creator><pubDate>Wed, 17 Jun 2026 06:28:25 GMT</pubDate></item></channel></rss>