-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 does not see Cargo.toml
if .gitignore
contains /*
#14411
Comments
Thanks for the report, though I cannot reproduce it. When you run Mine is $ git ls-files
.gitignore
Cargo.toml
src/main.rs
|
Sorry. Clicked the wrong button 🙇🏾♂️. |
|
I did the correct list of files on macOS.
Do you have any special Git configuration on your machine?
Is it possible on your side to bisect which version starts failing? Note that Cargo switched to gitoxide for file listing in 1.79.0. You could try |
|
toolchain version |
@cospectrum it might help if you can provide some information about this. cc @Byron |
I only have a short global |
I was also unable to reproduce the issue with My guess is that this I don't even have a question for @cospectrum as it's clear by now that we can't reproduce the issue, which probably means that some global git configuration is affecting this unexpectedly. It's actually kind of impossible right now to disable this effect without recompiling, unfortunately.
|
Follow the steps above and have the same problem
|
That's great! Actually, I noticed that previously Once that is fixed, I can reproduce the issue.
On it now. |
Apologies for getting back to this with such a delay, but there is good news: It looks like the latest In the example output below,
The fix is part of As a lower boundary, when compiling an older version (
Thus, no action is needed unless a backport is desired. Then I'd have to try and port the fix to |
So that would mean #14332 is what resolved this which is scheduled for 1.82 For 1.80, we have the workaround of @Byron what would you say the risk profile is for the upgrade from gix 0.63 to 0.64? This can help us in determining whether we should cherrypick the upgrade into 1.81. Overall, I'm leaning towards "no" regardless because we have about 2 weeks left before release which is not much time left for testing, so I would be very hesitant to do the cherry pick |
Thanks for the analysis!
|
In support of #14411 (comment) and #14411 (comment), I believe this was the same underlying issue as in GitoxideLabs/gitoxide#1458, so the fix for that in GitoxideLabs/gitoxide@1e92d1e (GitoxideLabs/gitoxide#1462) applies to this too. |
#14431 has backported gix bump to beta-1.81, so when 1.81 is stable there should be no issue of this. Close as resolved and thanks! |
Problem
If
.gitignore
is written in the style of "ignore everything except this", thencargo package --list
for some reason does not see anything.It seems to me that everything was fine on previous versions, I spent an hour investigating, did I miss something?
cargo version:
1.80.1 (376290515 2024-07-16)
git version
2.39.2
(Apple Git-143)OS:
mac
Cargo.toml:
.gitignore:
cargo package --list
Steps
Possible Solution(s)
No response
Notes
cargo build
is working,cargo publish
is not workingVersion
The text was updated successfully, but these errors were encountered: