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
Problem
Since updating to 1.46.0, for some reason we can't build our application if a git clone is using sparse checkouts.
Steps
c:\projects>cargo init foo
c:\projects>cd foo\
c:\projects\foo>git init Initialized empty Git repository in C:/projects/foo/.git/
c:\projects\foo>mkdir bar
c:\projects\foo>touch bar/test.txt
c:\projects\foo>echo fn main() { () } > build.rs
c:\projects\foo>vim build.rs
c:\projects\foo>ls
bar build.rs Cargo.toml src
c:\projects\foo>cargo run
Compiling foo v0.1.0 (C:\projects\foo)
Finished dev [unoptimized + debuginfo] target(s) in 1.31s
Running `target\x86_64-pc-windows-msvc\debug\foo.exe`
Hello, world!
c:\projects\foo>git sparse-checkout init --cone
c:\projects\foo>git sparse-checkout add src
c:\projects\foo>cargo run
error: failed to determine package fingerprint for build script for foo v0.1.0 (C:\projects\foo)
Caused by:
failed to determine the most recently modified file in c:\projects\foo
Caused by:
failed to determine list of files in c:\projects\foo
Caused by:
did not expect repo at c:/projects/foo/.git/ to be bare
c:\projects\foo>
Possible Solution(s)
I have no idea. Sorry!
Notes
Output of cargo version: cargo 1.46.0 (149022b 2020-07-17)
As far as I can tell this really breaks things in a solid way. Just disabling sparse-checkout after this isn't enough to recover.
The text was updated successfully, but these errors were encountered:
Could we also change cargo so that it doesn't fail if it cannot understand the git repo? It doesn't matter if the repo is completely borked; as long as there is a valid Cargo.toml, cargo should be able to run the build.
Problem
Since updating to 1.46.0, for some reason we can't build our application if a git clone is using sparse checkouts.
Steps
Possible Solution(s)
I have no idea. Sorry!
Notes
Output of
cargo version
: cargo 1.46.0 (149022b 2020-07-17)As far as I can tell this really breaks things in a solid way. Just disabling sparse-checkout after this isn't enough to recover.
The text was updated successfully, but these errors were encountered: