Conversation
Looking at the code, |
It is used right here which then sets the I have a ci run without the last commit on main, that worked. It seems like the switch to the |
Oh, duh, not sure how I missed that. What a mess, that could use some cleanup, too. So the test was never actually testing aot. |
Maybe the wwwroot is necessary? I also have a green CI run where I had it running on node, with minimal other changes to the toolchain (besides the async refactor and mjs changes for websocket). |
d588ae6 to
164b818
Compare
|
I don't know why the build doesn't fail in the ci, it crashes on my windows machine with the following errors: It does work with a minimal project (including main.js path). I'll see if i can fix this tomorrow. |
… from PATH - resolve js runtime from path - add option to specify wasm main.js template - add custom js runtime argument formatter option
2ead977 to
db48498
Compare
|
@timcassell It works now. The IntigrationTests still fail while building the dllgatherer on windows on my pc, but i couldn't reproduce it on another machine or with another project. Like I wrote in the description, this does remove the I've noticed an odd behavior that I did not want to touch: When I set KeepBenchmarkFiles to true and build the project twice, it references all dlls from the previous build. I'm not sure if BenchmarkDotNet should delete the dlls before reusing the folder or build in another folder instead. |
What's the error?
|
Looks like the error happened while building BenchmarkDotNet.Autogenerated. The dllgatherer only crashed because I didn't build the project before running the IntigrationTests. All those files do exist. BenchmarkDotNet.IntegrationTests-1-build-no-restore-no-deps.binlog.zip |
|
Looks like there's a merge conflict. |
f2c678d to
58a89b1
Compare
Should be fixed now. https://github.com/twobrainsgmbh/BenchmarkDotNet/actions/runs/22404078490 |
| <WasmTargetsPath>$([System.IO.Path]::ChangeExtension('$(OriginalCSProjPath)', '.Wasm.targets'))</WasmTargetsPath> | ||
| <WasmDataDir>$WASMDATADIR$</WasmDataDir> | ||
| <WasmDataDir Condition="'$(WasmDataDir)' != ''">$([MSBuild]::NormalizeDirectory($(WasmDataDir)))</WasmDataDir> | ||
| <WasmMainJSPath>$MAINJS$</WasmMainJSPath> |
There was a problem hiding this comment.
@ilonatommy You recently changed away from this property, what are your thoughts here?
tests/BenchmarkDotNet.IntegrationTests/BenchmarkDotNet.IntegrationTests.csproj
Show resolved
Hide resolved
pavelsavara
left a comment
There was a problem hiding this comment.
LGTM, but wait for Ilona's review
| if (globalThis.arguments !== undefined) | ||
| return globalThis.arguments; | ||
|
|
||
| // spdermonkey |
| [Theory] | ||
| [InlineData(MonoAotCompilerMode.mini)] | ||
| [InlineData(MonoAotCompilerMode.wasm)] | ||
| [InlineData(MonoAotCompilerMode.wasm, Skip = "AOT is broken")] |
There was a problem hiding this comment.
Add link to active issue. What's wrong with it ?
| File.WriteAllText(targetMainJsPath, content); | ||
| } | ||
|
|
||
| protected override string GetExecutablePath(string binariesDirectoryPath, string programName) => Path.Combine(binariesDirectoryPath, "wwwroot", "main.js"); |
There was a problem hiding this comment.
nit: I think the modern convention is to use .mjs extension.
This PR aims to improve WASM support (as described in #2890) in a few ways:
JavaScriptEnginenow resolves executables from the PATH.mainJsTemplatePathoption allows customizing the startup script (with polyfill, for example).--wasmDataDiroption, that was used by dotnet/performance to setWasmMainJSPath.--expose_wasmas default args forjavaScriptEngineArguments.AOT currently fails because the unit tests set only MonoAotCompilerMode and not the WasmRuntimes aot option. I've fixed the test and disabled it for now.