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

[wasm] The way of getting the path of runtimeconfig.json file is not always reliable #93692

Closed
fanyang-mono opened this issue Oct 18, 2023 · 2 comments · Fixed by #90436
Closed
Assignees
Labels
arch-wasm WebAssembly architecture area-Host
Milestone

Comments

@fanyang-mono
Copy link
Member

In wasm build process, the path of runtimeconfig.json file was generated based the location of the main app assembly. This would work with the assumption that runtimeconfig.json file lived in the same folder as the main app assembly file. This assumption was broken when enabling IL trim by default for wasm apps in my PR (#90436). When the main app assembly file gets trimmed, the newly generated trimmed assembly lives in a separated directory than the runtimeconfig.json file. We need a more robust way of finding runtimeconfig.json file.

@fanyang-mono fanyang-mono added the arch-wasm WebAssembly architecture label Oct 18, 2023
@fanyang-mono fanyang-mono added this to the 9.0.0 milestone Oct 18, 2023
@ghost
Copy link

ghost commented Oct 18, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

In wasm build process, the path of runtimeconfig.json file was generated based the location of the main app assembly. This would work with the assumption that runtimeconfig.json file lived in the same folder as the main app assembly file. This assumption was broken when enabling IL trim by default for wasm apps in my PR (#90436). When the main app assembly file gets trimmed, the newly generated trimmed assembly lives in a separated directory than the runtimeconfig.json file. We need a more robust way of finding runtimeconfig.json file.

Author: fanyang-mono
Assignees: radical
Labels:

arch-wasm

Milestone: 9.0.0

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Oct 18, 2023
@radical
Copy link
Member

radical commented Oct 19, 2023

The assumption is correct because runtimeconfig.json files are always next to the assembly. But in the ILStrip PR case, because the assembly when stripped moves to a different location, the old path is no longer reachable. Thus the old path needs to be retained, and used.

@radical radical assigned fanyang-mono and unassigned radical Oct 19, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Nov 13, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Host
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants