Skip to content
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

[msbuild/tools] Fix path issues in the FilterStaticFrameworks task and ExtractBindingLibraries step. Fixes #15289. #15321

Merged
merged 4 commits into from
Jul 11, 2022

Conversation

rolfbjarne
Copy link
Member

In the FilterStaticFrameworks task:

  • Convert Windows-style paths to Mac-style paths.
  • Give a better error if a framework can't be found.
  • Don't try to copy frameworks that don't exist on Windows to the Mac.

In the ExtractBindingLibrariesStep:

  • Return a relative path to frameworks we've extracted to make things easier for
    remote builds.

  • In the _ComputeFrameworkFilesToPublish target, don't compute the source
    directory for frameworks using RootDir + Directory, because some frameworks
    may only exist on the mac, and RootDir + Directory will be a Windows path
    when building remotely. Instead use 'Identity', which is a relative path and
    will work on both Windows and Mac.

Fixes #15289.

…d ExtractBindingLibraries step. Fixes dotnet#15289.

In the FilterStaticFrameworks task:

* Convert Windows-style paths to Mac-style paths.
* Give a better error if a framework can't be found.
* Don't try to copy frameworks that don't exist on Windows to the Mac.

In the ExtractBindingLibrariesStep:

* Return a relative path to frameworks we've extracted to make things easier for
  remote builds.

* In the _ComputeFrameworkFilesToPublish target, don't compute the source
  directory for frameworks using RootDir + Directory, because some frameworks
  may only exist on the mac, and RootDir + Directory will be a Windows path
  when building remotely. Instead use 'Identity', which is a relative path and
  will work on both Windows and Mac.

Fixes dotnet#15289.
@rolfbjarne rolfbjarne added the bug If an issue is a bug or a pull request a bug fix label Jun 22, 2022
@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMBOT-1105.Monterey'
Hash: 27a295bbfb5bf7bd1f8c52b8e14c8e7ab8e8249c [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS Mac Catalina (10.15) passed 💻

All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: 27a295bbfb5bf7bd1f8c52b8e14c8e7ab8e8249c [PR build]

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [CI Build] Tests failed on VSTS: simulator tests iOS ❌

Tests failed on VSTS: simulator tests iOS.

Test results

9 tests failed, 139 tests passed.

Failed tests

  • framework-test/Mac [dotnet]/Debug [dotnet]: Failed (Test run crashed (exit code: 134).
    No test log file was produced)
  • framework-test/Mac Catalyst [dotnet]/Debug [dotnet]: Failed (Test run crashed (exit code: 134).
    No test log file was produced)
  • framework-test/iOS Unified 64-bits - simulator/Debug [dotnet]: BuildFailure
  • framework-test/tvOS - simulator/Debug [dotnet]: Crashed
  • xcframework-test/Mac [dotnet]/Debug [dotnet]: Failed (Test run crashed (exit code: 134).
    No test log file was produced)
  • xcframework-test/Mac Catalyst [dotnet]/Debug [dotnet]: Failed (Test run crashed (exit code: 134).
    No test log file was produced)
  • xcframework-test/iOS Unified 64-bits - simulator/Debug [dotnet]: Crashed
  • xcframework-test/tvOS - simulator/Debug [dotnet]: Crashed
  • DotNet tests: Failed (Execution failed with exit code 1)

Pipeline on Agent XAMBOT-1105.Monterey'
Merge 27a295b into b03bd25

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [PR Build] Build failed 🔥

Build failed for the job 'Detect API changes'

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 Unable to find the contents for the comment: D:\a\1\s\change-detection\results\gh-comment.md does not exist :fire

Pipeline on Agent
Hash: 27a295bbfb5bf7bd1f8c52b8e14c8e7ab8e8249c [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS Mac Catalina (10.15) passed 💻

All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: d12531e2e4dc54ce754e272c79f5f0bf43f0dd64 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMBOT-1017.Monterey'
Hash: d12531e2e4dc54ce754e272c79f5f0bf43f0dd64 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
  • iOS (no change detected)
  • tvOS (no change detected)
  • watchOS (no change detected)
  • macOS (no change detected)
NET (empty diffs)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: (empty diff detected)

✅ API diff vs stable

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)
Legacy Xamarin (stable) vs .NET

✅ Generator diff

Generator diff is empty

Pipeline on Agent
Hash: d12531e2e4dc54ce754e272c79f5f0bf43f0dd64 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌

Failed tests are:

  • monotouch-test

Pipeline on Agent
Hash: d12531e2e4dc54ce754e272c79f5f0bf43f0dd64 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

0 tests crashed, 4 tests failed, 219 tests passed.

Failures

❌ monotouch tests

3 tests failed, 20 tests passed.
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (LinkSdk): Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar): Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations): Failed

Html Report (VSDrops) Download

❌ mtouch tests

1 tests failed, 0 tests passed.
  • MTouch tests/NUnit: Failed (Execution failed with exit code 19)

Html Report (VSDrops) Download

Successes

✅ bcl: All 69 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 7 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ introspection: All 8 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 12 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [PR build]

@rolfbjarne
Copy link
Member Author

Test failures are unrelated:

@rolfbjarne rolfbjarne merged commit abbd6ef into dotnet:main Jul 11, 2022
@rolfbjarne rolfbjarne deleted the issue-15289 branch July 11, 2022 08:39
@rolfbjarne
Copy link
Member Author

/sudo backport d17-2

@rolfbjarne
Copy link
Member Author

/sudo backport release/6.0.3xx

@rolfbjarne
Copy link
Member Author

/sudo backport release/6.0.4xx

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Backport Job to branch d17-2 Created! The magic is happening here

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Backport Job to branch release/6.0.3xx Created! The magic is happening here

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Backport Job to branch release/6.0.4xx Created! The magic is happening here

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Hooray! Backport succeeded! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=6395065 for more details.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Hooray! Backport succeeded! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=6395064 for more details.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Hooray! Backport succeeded! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=6395066 for more details.

rolfbjarne added a commit that referenced this pull request Jul 14, 2022
…Frameworks task and ExtractBindingLibraries step. Fixes #15289. (#15442)

In the FilterStaticFrameworks task:

* Convert Windows-style paths to Mac-style paths.
* Give a better error if a framework can't be found.
* Don't try to copy frameworks that don't exist on Windows to the Mac.

In the ExtractBindingLibrariesStep:

* Return a relative path to frameworks we've extracted to make things easier for
  remote builds.

* In the _ComputeFrameworkFilesToPublish target, don't compute the source
  directory for frameworks using RootDir + Directory, because some frameworks
  may only exist on the mac, and RootDir + Directory will be a Windows path
  when building remotely. Instead use 'Identity', which is a relative path and
  will work on both Windows and Mac.

Fixes #15289.


Backport of #15321

Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
rolfbjarne added a commit that referenced this pull request Jul 14, 2022
…Frameworks task and ExtractBindingLibraries step. Fixes #15289. (#15444)

In the FilterStaticFrameworks task:

* Convert Windows-style paths to Mac-style paths.
* Give a better error if a framework can't be found.
* Don't try to copy frameworks that don't exist on Windows to the Mac.

In the ExtractBindingLibrariesStep:

* Return a relative path to frameworks we've extracted to make things easier for
  remote builds.

* In the _ComputeFrameworkFilesToPublish target, don't compute the source
  directory for frameworks using RootDir + Directory, because some frameworks
  may only exist on the mac, and RootDir + Directory will be a Windows path
  when building remotely. Instead use 'Identity', which is a relative path and
  will work on both Windows and Mac.

Fixes #15289.


Backport of #15321

Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
@dominic7125
Copy link

Has this fix merged into Xamarin or net6.0-ios?

@chamons
Copy link
Contributor

chamons commented Aug 4, 2022

This has been merged into 6.0.4 release branch, currently available in 17.3 Preview 6, and will be in the next stable release.

@dominic7125
Copy link

I still have the problem with 17.3.0 Preview 6.
I will try to create a sample project to reproduce and open an issue for this.

@LukasKuchta
Copy link

LukasKuchta commented Sep 15, 2022

I can confirm @dominic7125 report. I have a same trouble on last version of Microsoft Visual Studio Enterprise 2022 (64-bit) - Preview Version 17.4.0 Preview 1.0

MAUI/Net6 and IOS binding of native framework.

Exactly same as dotnet/maui#8000

Error CS1566 Error reading resource 'TestFramework.framework' -- 'Access to the path 'C:\Users\...\FrameworkTest_ForGithub\TestMauiApp\TestMauiFrameworkBindings\Native References\TestFramework.framework' is denied.' TestMauiFrameworkBindings

Any workaround or solution ? It is blocker for us to migrate from Forms to MAUI.

@rolfbjarne
Copy link
Member Author

@LukasKuchta please file a new issue (https://github.com/xamarin/xamarin-macios/issues/new) and attach a binlog and we'll have a look.

@dominic7125
Copy link

@LukasKuchta
I tried the latest version of Visual Studio.
I could build the app binding dynamic framework on Visual studio for Mac, but failed on PC.
Binding static framework is still not builtable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug If an issue is a bug or a pull request a bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build fails if app references library which contains framework library inside
7 participants