You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed, that might certainly be important for the discussion...
For that build, I used a 2020-06-12 nightly.
To reiterate, the flaw is not in hyper(since the crate has the file that is pointed out by package.readme in its Cargo.toml. Which, of course, makes the issue opened in the wrong place. But, perhaps, this place is a good starting point...
And, it is also NOT in cargo.
The code in cargo that bails out on a lacking readme file is in commit b0a3cc6b7a42a15937cc63d6b26aa4d25af6ce99.
It might be that that commit was later reverted, if it caused too much collateral damage...
But, really...
That code checks that a file exists, if it is pointed out in Cargo.toml.
Is that asking too much ?
The question is rather:
Why isn't README.md included in the crate source archive when served from "crates.io" ??? wget -O - 'https://crates.io/api/v1/crates/hyper/0.14.7/download' 2>/dev/null | tar tvz | grep README.md returns nothing.
Is it because of some misplaced optimization effort ?
Nope, because, for example, for the serde crate version 1.0.117 we have: wget -O - 'https://crates.io/api/v1/crates/serde/1.0.117/download' 2>/dev/null|tar xzO serde-1.0.117/Cargo.toml|grep readme
returns readme = "crates-io.md".
And that file exists in the archive: wget -O - 'https://crates.io/api/v1/crates/serde/1.0.117/download' 2>/dev/null|tar tvz|grep crates-io.md
returns: -rw-r--r-- 1000/1000 2332 2020-07-13 04:03 serde-1.0.117/crates-io.md
Either way, to help avoid issues like that, an option would be to remove the line that specifies README.md since by default (since almost a year ago rust-lang/cargo#8277) cargo checks if a README.md exists if one hasn't been specified, but doesn't error when it doesn't.
Activity
memoryruins commentedon May 16, 2021
Which rust toolchain are you using? A similar issue was opened last year, but it was a regression in a cargo nightly #2231
cmskog commentedon May 17, 2021
Indeed, that might certainly be important for the discussion...
For that build, I used a 2020-06-12 nightly.
To reiterate, the flaw is not in hyper(since the crate has the file that is pointed out by package.readme in its Cargo.toml. Which, of course, makes the issue opened in the wrong place. But, perhaps, this place is a good starting point...
And, it is also NOT in cargo.
The code in cargo that bails out on a lacking readme file is in commit b0a3cc6b7a42a15937cc63d6b26aa4d25af6ce99.
It might be that that commit was later reverted, if it caused too much collateral damage...
But, really...
That code checks that a file exists, if it is pointed out in Cargo.toml.
Is that asking too much ?
The question is rather:
Why isn't README.md included in the crate source archive when served from "crates.io" ???
wget -O - 'https://crates.io/api/v1/crates/hyper/0.14.7/download' 2>/dev/null | tar tvz | grep README.mdreturns nothing.Is it because of some misplaced optimization effort ?
Nope, because, for example, for the serde crate version 1.0.117 we have:
wget -O - 'https://crates.io/api/v1/crates/serde/1.0.117/download' 2>/dev/null|tar xzO serde-1.0.117/Cargo.toml|grep readmereturns
readme = "crates-io.md".And that file exists in the archive:
wget -O - 'https://crates.io/api/v1/crates/serde/1.0.117/download' 2>/dev/null|tar tvz|grep crates-io.mdreturns:
-rw-r--r-- 1000/1000 2332 2020-07-13 04:03 serde-1.0.117/crates-io.mdIdeas ?
memoryruins commentedon May 17, 2021
Yea I think the regression was fixed a few days later with rust-lang/cargo#8353
Either way, to help avoid issues like that, an option would be to remove the line that specifies
README.mdsince by default (since almost a year ago rust-lang/cargo#8277) cargo checks if aREADME.mdexists if one hasn't been specified, but doesn't error when it doesn't.hyper/Cargo.toml
Line 5 in 960a69a
Alternatively/ in addition, the readme file could be added to the include list
hyper/Cargo.toml
Lines 15 to 20 in 960a69a