-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix extraction of Xamarin.Build.Download #1048
base: main
Are you sure you want to change the base?
Conversation
|
||
prel.AddItem ( | ||
"XamarinBuildDownload" , "GAppM-10.28.0" , new Dictionary<string , string> { | ||
{ "Url", "https://dl.google.com/firebase/ios/analytics/4d5ec9a36b6d4fd4/GoogleAppMeasurement-10.28.0.tar.gz" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we'll need to move this test data somewhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with comment to move test data somewhere else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we're missing the root cause of the issue here, and this is just a workaround.
The reported issue is that the C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\GAppM-10.28.0\GAppM-10.28.0.tar
file already exists.
If the file already exists then we should not be downloading it again in the first place, so the question is "why are we trying to download this?".
My guess is that maybe a previous extraction failed before the GAppM-10.28.0.unpacked
file got written.
If you delete your C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\GAppM-10.28.0
directory and then try again, do you still see this error? If so, did the GAppM-10.28.0.unpacked
file get written?
We need to figure out if:
- This was a one time bad state and clearing the directory fixes it.
- There is an issue writing the
.tar
, extracting the.tar
file, or writing the.unpacked
file. - Everything is extracted correctly and we aren't detecting the existing files and are trying to run the process a second time when it isn't needed.
I tried running the unit test locally without the overwrite change and it succeeded. I'm not sure how the test could fail because it always tries writing to a fresh Path.GetTempFileName ()
, so there should never be an existing file that needs to be overwritten. If the test is failing for you locally, hopefully debugging it will help determine which of the above scenarios is occuring.
Yes, a new folder will be created every time, but I will definitely reproduce this |
It has been staying in Extracting
The only difference is that I set the compilation environment to net9 |
It is not a download, but a decompression problem of GAppM-10.28.0 |
Sure, but I still don't understand what the root issue is. When we decompress
Perhaps another way to explore this:
|
In fact, tar.gz performs two extractions. The first extraction is successful, but during the second extraction, a confirmation about the existence of the file will appear. |
Now that we have obtained the execution parameters for the two decompressions, try to execute them in PowerShell
|
When extracting GAppM-10.28.0.tgz and GAppM-10.28.0.tar, it prompts whether to overwrite because they contain files with the same name. Is this a problem unique to GAppM-10.28.0? |
Fix #1047
Before fix:
2024-11-16.23.39.10.mov
After fix: