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

[dotnet] Ensure appropriate IL Strip value for multi-rid builds #21391

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

haritha-mohan
Copy link
Contributor

IsMultiRidBuild tracks if we are executing an inner build for a multi-rid case. With this approach, if the user specifies a value for EnableAssemblyILStripping it will still be honored. Otherwise, to ensure we don't duplicate assemblies when merging the app bundles due to a strip vs non-strip scenario, IL stripping for the multi-rid build is disabled by default.

There have been past examples of optimizing in the outer-build: #12847
But because IL Stripping is contingent on the evaluation of other RID-specific properties, not sure if that is a feasible approach here.

Fixes #17115

@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

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@haritha-mohan haritha-mohan marked this pull request as ready for review October 9, 2024 04:21
@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build] Build failed 🔥

Build failed for the job 'Build macOS tests'

Pipeline on Agent
Hash: c0299341c654f6b1d4eac1545ce3130276a9cb23 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: (empty diff detected)

✅ API diff vs stable

.NET (No breaking changes)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: c0299341c654f6b1d4eac1545ce3130276a9cb23 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: c0299341c654f6b1d4eac1545ce3130276a9cb23 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 2 tests failed, 97 tests passed.

Failures

❌ dotnettests tests (MacCatalyst)

1 tests failed, 0 tests passed.
  • DotNet tests: Failed (Execution failed with exit code 1)

Html Report (VSDrops) Download

❌ linker tests

1 tests failed, 39 tests passed.
  • trimmode link/iOS Unified 64-bits - simulator/Debug [dotnet]: Failed

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 1 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 7 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 7 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: c0299341c654f6b1d4eac1545ce3130276a9cb23 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: c0299341c654f6b1d4eac1545ce3130276a9cb23 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: c0299341c654f6b1d4eac1545ce3130276a9cb23 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: c0299341c654f6b1d4eac1545ce3130276a9cb23 [PR build]

Copy link
Member

@rolfbjarne rolfbjarne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would also be interesting to see the app size for a Release build of a Mac Catalyst app before and after this change.

Comment on lines +114 to +115
// Verify value defaults to false when not set
properties ["EnableAssemblyILStripping"] = shouldStrip ? "true" : "";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't actually test the default value, since you're setting the value in the test.

You need to build for "Release", not set EnableAssemblyILStripping, and then verify that the app's assemblies are not stripped (when building for two runtime identifiers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable IL Stripping if any RID for a universal app has it disabled by default
5 participants