Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Ship a .framework version of Mono #53370
Ship a .framework version of Mono #53370
Changes from 5 commits
3d876f7
ada980d
82555d5
4879ec7
9e3bc17
ff168f9
f97e186
0ee1330
7d8d578
e97ec4c
f16eabb
75ea8d1
9bd0b0e
4ee0938
45f4e2b
3315ef6
8f544ab
db386ee
aa31a96
62ab8ae
2837fcb
65e00a7
29e9413
bd8272e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can we add a conditional flag so its only built when building from mono.proj ?
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.
So this is going to be a mono framework for ios/tvos/catalyst that always statically links in the full non-stub versions of all the components. Is that what we want? We always want to support hot reload and diagnostics, @rolfbjarne ?
Or should each component be its own dynamic .framework, too? (in which case... it would be upto the xamarin-macios embedding code to hook mono_dl_open and locate the components for us)
Or maybe one mono.framework with all the components, and one with only stubs?
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 have not read the PR yet... but the goal of a
.framework
is that it's all dynamic (not static) linkingThere 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.
yea mono is built as a dynamic thing, but it will include all the components statically as part of it. I left some comments on the Paper.
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.
Isn't there a hard limit to the number of .frameworks an app can have?
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.
Debug
[1] unless it starts affecting build/deploy times :-)
Release
.framework
.a
allows the native linker / strip to remove a lot of code. Using the framework would create much larger apps..framework
is needed for app extensions.framework
than to have a (even partial) runtime in 2 (or more) executables - main app and one/several extension(s)I do not see "hot reload" needed for release builds. Not entirely sure about "diagnostics" ...
Modularity is more important for the static libraries. The majority of apps ships without extensions (but that could change).
There's a limit (at least a suggested one, never seen a rejection) to the number of user frameworks that an app should have. However a framework can have several dynamic libraries inside it... so we could control what's in or out.
Not sure if that's really needed...
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.
Given there are quite a number of conditions and cases I wonder if it'd make more sense for Xamarin.iOS to create the .framework as part of the build when it is needed with just the right components? E.g. I've heard that we have some requirements to not ship the diagnostics TCP server code in release builds, even if it is not used.
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.
We can create Mono.framework, but afaik we can't create the corresponding dSYM, that has to be done on the machine that compiled the object files.
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've done some work relating to debug symbol generation in #53240
dsyms for anything we generate and put in a nupkg should be available from the MS debug symbol service
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.
@rolfbjarne we do have the dSYM's and can put them into the runtime pack (or the symbols nuget), would you mind trying if you can create the .framework based off of that?
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.
@akoeplinger I created a very simple test case, and I was able to create a
.framework
and the corresponding.framework.dSYM
from a.dylib
and its corresponding.dylib.dSYM
. I ran an executable that consumed the.framework
in lldb, and lldb was able to symbolicate functions in the.framework
. I wasn't able to make macOS' crash reporter symbolicate the framework functions though, so I'm not sure if the end result is actually correct, or if it just happens to work in lldb. One point is that Apple identifies .dSYM directories using a UUID (which shows up in the crash report), and if we create the.framework.dSYM
from the.dylib.dSYM
, those share the same UUID, and potentially things break.