-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[browser] Inline boot config #114686
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
[browser] Inline boot config #114686
Changes from all commits
75ad5e2
71d2c28
9e4ca0a
7948e5a
e66b0ed
eb71569
5b74804
7b3f2bb
cd3fd87
88297bd
34ee8fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -366,14 +366,17 @@ private string[] GetFilesMatchingNameConsideringFingerprinting(string filePath, | |
| dict[Path.GetFileName(file)] = (file, unchanged); | ||
|
|
||
| // those files do not change on re-link | ||
| dict["dotnet.js"]=(Path.Combine(paths.BinFrameworkDir, "dotnet.js"), true); | ||
| dict["dotnet.js"]=(Path.Combine(paths.BinFrameworkDir, "dotnet.js"), false); // Inline boot config | ||
| dict["dotnet.js.map"]=(Path.Combine(paths.BinFrameworkDir, "dotnet.js.map"), true); | ||
| dict["dotnet.runtime.js"]=(Path.Combine(paths.BinFrameworkDir, "dotnet.runtime.js"), true); | ||
| dict["dotnet.runtime.js.map"]=(Path.Combine(paths.BinFrameworkDir, "dotnet.runtime.js.map"), true); | ||
|
|
||
| if (IsFingerprintingEnabled) | ||
| { | ||
| string bootJsonPath = Path.Combine(paths.BinFrameworkDir, "dotnet.boot.js"); | ||
| if (!File.Exists(bootJsonPath)) | ||
| bootJsonPath = Path.Combine(paths.BinFrameworkDir, "dotnet.js"); // inline boot config | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't this be confusing that we are checking is-config-inlined by the presence of config files, not by
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, we should pass |
||
|
|
||
| BootJsonData bootJson = GetBootJson(bootJsonPath); | ||
| var keysToUpdate = new List<string>(); | ||
| var updates = new List<(string oldKey, string newKey, (string fullPath, bool unchanged) value)>(); | ||
|
|
@@ -493,7 +496,7 @@ private BootJsonData GetBootJson(string bootJsonPath) | |
| public BootJsonData AssertBootJson(AssertBundleOptions options) | ||
| { | ||
| EnsureProjectDirIsSet(); | ||
| string bootJsonPath = Path.Combine(options.BinFrameworkDir, options.BuildOptions.BootConfigFileName); | ||
| string bootJsonPath = Path.Combine(options.BinFrameworkDir, options.BuildOptions.BootConfigFileName ?? "dotnet.js"); | ||
| BootJsonData bootJson = GetBootJson(bootJsonPath); | ||
| string spcExpectedFilename = $"System.Private.CoreLib{WasmAssemblyExtension}"; | ||
|
|
||
|
|
||
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.
Why do we want to merge
monoConfigwith empty value?Uh oh!
There was an error while loading. Please reload this page.
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.
This is a placeholder that gets replaced during build by the actual boot config. If the inlining is turned off (temporal option) this will be no-op (merge with empty value).