-
Notifications
You must be signed in to change notification settings - Fork 547
[Windows] Fix _CompileNativeExecutable inputs/outputs #23533
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
Conversation
`_CompileNativeExecutable` was always being executed from Windows being its inputs and outputs were never generated: - **ILLink**: we were not creating outputs for the `linker-cache` directory. Also, the previous behavior would always create an output file for all the Macs for the analyzed directories, but not all of them actually changed on each run, making the Windows side outputs to be incorrectly updated (and forcing other targets execution). - **CompileNativeCode**: was not reporting the compiled output files, forcing `_CompileNativeExecutable` to always run. Finally, removed the `Xamarin.MacDev.Tasks.ILLink` output parameters we don't use from the targets. The task contains those outputs mainly to create the empty output files on Windows. I'll add a test for this in an upcoming PR. Fixes #19609
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The `_LinkNativeExecutable` always runs because its inputs/outputs are not created on Windows. Its own output file was never created because the task was not configured to do so. Also, the `_MtouchSymbolsList` was being written remotely so it was never found on Windows when checking the outputs. It's safe to write this locally as it will be copied as part of running this task as it is one of its declared dependencies. For the target to be fully skipped this fix depends on #23533, which makes the compiled native executable output file to exist on Windows. Fixes #19610
We do this after analyzing the outputFile path, because if the metadata is not set it will be inferred from src and for remote builds we need relative paths.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #494715e] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #494715e] Build passed (Build packages) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commit.NET ( No breaking changes )✅ API diff vs stable.NET ( No breaking changes )ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #494715e] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #494715e] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #494715e] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #494715e] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #494715e] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
🚀 [CI Build #494715e] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 115 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
_CompileNativeExecutablewas always being executed from Windows being its inputs and outputs were never generated:linker-cachedirectory. Also, the previous behavior would always create an output file for all the Macs for the analyzed directories, but not all of them actually changed on each run, making the Windows side outputs to be incorrectly updated (and forcing other targets execution)._CompileNativeExecutableto always run.Finally, removed the
Xamarin.MacDev.Tasks.ILLinkoutput parameters we don't use from the targets. The task contains those outputs mainly to create the empty output files on Windows.I'll add a test for this in an upcoming PR.
Fixes #19609