Uh oh!
There was an error while loading. Please reload this page.
[One .NET] *.runtimeconfig.json support - #6009
Merged
Merged
Conversation
grendelloforce-pushed
the
runtimeconfig.json
branch
from
June 10, 2021 16:55
f8d38a9 to
7eb8e6eComparegrendello
marked this pull request as ready for review
June 10, 2021 16:57
WIP, I implemented the MSBuild side partially.
grendelloforce-pushed
the
runtimeconfig.json
branch
from
June 10, 2021 21:03
7eb8e6e to
69eabe6Comparegrendelloforce-pushed
the
runtimeconfig.json
branch
from
June 10, 2021 22:21
69eabe6 to
ea815d7Comparedellis1972
approved these changes
Jun 11, 2021
| break; | ||
| case 7: // bound_stream_io_exception_type: byte / .byte | ||
| case 7: |
Contributor
There was a problem hiding this comment.
Two questions:
- Elsewhere, there's a comment on the
caseline saying what field it's for. It's missing here. Should there be a comment? - Why insert as "field [Xamarin.Android.Build.Tasks] Added missing files from commit 59ec488b #7" instead of appending as "field [README] Expand the Build Requirements section. #12"?
Contributor
There was a problem hiding this comment.
Why insert as "field #7"? So that all the bool fields are together in e.g. https://github.com/xamarin/xamarin-android/pull/6009/files#diff-920537864b4d4fbcacfad5ebfdcfd73470855176b83f4c4592d604a7057b7d3dR108
Values are always strings
jonathanpeppers
commented
Jun 11, 2021
MemberAuthor
jonathanpeppers
commented
Jun 14, 2021
MemberAuthor
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Commit message: Context: https://github.com/dotnet/runtime/blob/d95bfea59ed7d19e9b1db096c9d332005989296b/docs/design/mono/mobile-runtimeconfig-json.md
.NET allows including a [`runtimeconfig.json`][0] file in an
application, which can be used to control runtime configuration
options, provide "backing data" to [`AppContext.GetData()`][1],
control configuration values, and more.
Update the Xamarin.Android-for-.NET 6 build process to call the new
[`<RuntimeConfigParser/>` task][2], which will process the
`runtimeconfig.json` files into an efficient binary blob, which will
be added to the `.apk` as `assemblies/rc.bin`.
During process startup, `assemblies/rc.bin` will be proved to
`monovm_runtimeconfig_initialize()`, which will parse `rc.bin`.
Certain `runtimeconfig.json` properties are *reserved*: if they're
specified within `runtimeconfig.json`, then the
`<RuntimeConfigParser/>` task will throw an `ArgumentException`, and
the build will fail. The reserved properties are controlled by the
`@(_RuntimeConfigReservedProperties)` item group, and are reserved
because the Xamarin.Android runtime needs to control the value of
these properties for proper app execution, e.g. `PINVOKE_OVERRIDE`
(cf84e1b9, 0cd890bd).
Co-authored-by: Marek Habersack <grendel@twistedcode.net>[0]: https://docs.microsoft.com/en-us/dotnet/core/run-time-config/#runtimeconfigjson[1]: https://docs.microsoft.com/en-us/dotnet/api/system.appcontext.getdata?view=net-5.0[2]: https://github.com/dotnet/runtime/blob/01b7e73cd378145264a7cb7a09365b41ed42b240/src/tasks/RuntimeConfigParser/RuntimeConfigParser.cs |
grendello pushed a commit
to grendello/xamarin-android
that referenced
this pull request
Jun 16, 2021
Context: https://github.com/dotnet/runtime/blob/d95bfea59ed7d19e9b1db096c9d332005989296b/docs/design/mono/mobile-runtimeconfig-json.md .NET allows including a [`runtimeconfig.json`][0] file in an application, which can be used to control runtime configuration options, provide "backing data" to [`AppContext.GetData()`][1], control configuration values, and more. Update the Xamarin.Android-for-.NET 6 build process to call the new [`<RuntimeConfigParser/>` task][2], which will process the `runtimeconfig.json` files into an efficient binary blob, which will be added to the `.apk` as `assemblies/rc.bin`. During process startup, `assemblies/rc.bin` will be proved to `monovm_runtimeconfig_initialize()`, which will parse `rc.bin`. Certain `runtimeconfig.json` properties are *reserved*: if they're specified within `runtimeconfig.json`, then the `<RuntimeConfigParser/>` task will throw an `ArgumentException`, and the build will fail. The reserved properties are controlled by the `@(_RuntimeConfigReservedProperties)` item group, and are reserved because the Xamarin.Android runtime needs to control the value of these properties for proper app execution, e.g. `PINVOKE_OVERRIDE` (cf84e1b, 0cd890b). Co-authored-by: Marek Habersack <grendel@twistedcode.net> [0]: https://docs.microsoft.com/en-us/dotnet/core/run-time-config/#runtimeconfigjson [1]: https://docs.microsoft.com/en-us/dotnet/api/system.appcontext.getdata?view=net-5.0 [2]: https://github.com/dotnet/runtime/blob/01b7e73cd378145264a7cb7a09365b41ed42b240/src/tasks/RuntimeConfigParser/RuntimeConfigParser.cs
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

WIP, I implemented the MSBuild side partially.