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

WebAssembly should support handling runtimeconfig.json #38433

Closed
Tracked by #49237
akoeplinger opened this issue Jun 26, 2020 · 8 comments · Fixed by #56486
Closed
Tracked by #49237

WebAssembly should support handling runtimeconfig.json #38433

akoeplinger opened this issue Jun 26, 2020 · 8 comments · Fixed by #56486
Assignees
Labels
arch-wasm WebAssembly architecture area-VM-meta-mono
Milestone

Comments

@akoeplinger
Copy link
Member

See #37535 (comment)

@akoeplinger akoeplinger added arch-wasm WebAssembly architecture area-VM-meta-mono labels Jun 26, 2020
@akoeplinger akoeplinger added this to the 5.0.0 milestone Jun 26, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Jun 26, 2020
@marek-safar
Copy link
Contributor

Could you clarify why? We'd need to copy the files to the temp file system and add all the baggage for handling the json logic which is not necessary for self-contained setup.

I think a better approach is to add the configProperties section which is probably the only relevant part for self-contained configs to csproj PropertyGroup and handle it during build.

@marek-safar marek-safar modified the milestones: 5.0.0, Future Jun 30, 2020
@marek-safar marek-safar removed the untriaged New issue has not been triaged by the area owner label Jun 30, 2020
@akoeplinger
Copy link
Member Author

Yeah I was imprecise when creating the title, I don't think we need to necessarily read the file as part of the WASM process but we need to handle it somehow rather than just ignoring it.

@akoeplinger akoeplinger changed the title WebAssembly should support reading runtimeconfig.json WebAssembly should support handling runtimeconfig.json Jun 30, 2020
@radical
Copy link
Member

radical commented May 24, 2021

I think a better approach is to add the configProperties section which is probably the only relevant part for self-contained configs to csproj PropertyGroup and handle it during build.

Do you mean - read the configProperties section of the runtimeConfig.json, and add it to the build, so that we don't have to support reading runtimeConfig.json itself in the wasm app?

@marek-safar
Copy link
Contributor

We should just leverage the runtimeConfig.json task we have for mobile AOT for WASM AOT

@lambdageek lambdageek modified the milestones: Future, 6.0.0 Jun 22, 2021
@lambdageek
Copy link
Member

Yea, this is exactly what the runtimeConfig.json task is meant to do. The WasmApp target needs to be updated to use it, and then driver.c needs to be updated to call the runtime API that consumes the binary blob of the parsed json file.

@fanyang-mono fanyang-mono self-assigned this Jul 9, 2021
@SamMonoRT
Copy link
Member

cc @lewing @radical - Fan will give this a shot.

@eerhardt
Copy link
Member

Is this going to be completed for .NET 6? Using AppContext switches is becoming more and more important in order to support feature switches. For example, the plan in #55102 is relying on the fact that an AppContext switch will be set in applications that will be trimmed during F5/dotnet run.

@SamMonoRT
Copy link
Member

Is this going to be completed for .NET 6? Using AppContext switches is becoming more and more important in order to support feature switches. For example, the plan in #55102 is relying on the fact that an AppContext switch will be set in applications that will be trimmed during F5/dotnet run.

Yes, a PR should be up soon

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 28, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Aug 6, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-VM-meta-mono
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants