Uh oh!
There was an error while loading. Please reload this page.
[wasm][wbt] Test that dotnet.js could be run from any current directory - #69441
Conversation
ghost
commented
May 17, 2022
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
Until then, replace `else t=r.name;` in dotnet.js with `else t=locateFile(r.name);`
ghost
commented
May 17, 2022
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsUse locateFile to resolve path for assets outside of remoteSources, so that we can run from a different path than locate that dotnet.js exists ref: #69259 I followed the repro step described in the Issue ( #69259 ) and confirmed that it works. Referring to the
|
pavelsavara
commented
May 17, 2022
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
pavelsavara
commented
May 17, 2022
hi @yamachu, thanks for the contribution! It would be great to add unit test to cover running V8 and NodeJS from different folder. I also wonder what would happen to web app, which has |
yamachu
commented
May 18, 2022
Thanks for the review! I have set up an environment to run the tests you presented, so I rewrote the working directory and ran the tests. |
yamachu
commented
May 18, 2022
I have not yet been to verify this for the web app. In a web environment, it may be desirable to override the locateFile, as in the following sample code. However, I think it is also possible to support this by utilizing Currently, only icu files support remoteSources, but I think that by making all assets support it, it will be possible to execute in a way that does not depend on the behavior of the locateFile. |
This comment was marked as outdated.
This comment was marked as outdated.
Uh oh!
There was an error while loading. Please reload this page.
ghost
commented
May 29, 2022
Tagging subscribers to this area: @directhex Issue DetailsUse locateFile to resolve path for assets outside of remoteSources, so that we can run from a different path than locate that dotnet.js exists ref: #69259 I followed the repro step described in the Issue ( #69259 ) and confirmed that it works. Referring to the
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
pavelsavara
commented
Jul 21, 2022
pavelsavara
commented
Jul 26, 2022
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
radical
commented
Jul 26, 2022
You need to add the new test classes to https://github.com/dotnet/runtime/blob/main/eng/testing/scenarios/BuildWasmAppsJobsList.txt . |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| string binDir = GetBinDir(baseDir: _projectDir!, config: buildArgs.Config); | ||
| string appBundleDir = Path.Combine(binDir, "AppBundle"); | ||
| string tmpBundleDirName = "AppBundleTmp"; | ||
| string tmpBundleDir = Path.Combine(binDir, tmpBundleDirName); |
There was a problem hiding this comment.
What do you think of creating this tmpBundleDir in a completely different location, like under Path.GetTempPath()? This would ensure that it isn't dependent on anything in the binDir.
And make sure to add id, and the project name to the dir name, so the different runs don't overlap.
There was a problem hiding this comment.
It is a good method in Node and V8 environments!
I' ll change that style.
However, browsers like Chrome cannot explore the parent directory, so I would like to keep the current style.
Uh oh!
There was an error while loading. Please reload this page.
radical
commented
Jul 27, 2022
Don't merge yet. The test needs some changes. I will get those working locally, and share that tomorrow. |
radical
commented
Jul 27, 2022
So, one of the problems with the IIUC, the intention here is:
This is what I came up with: https://gist.github.com/radical/18d60949c789cf98f8b175c30096b683 . Feel free to add this to your PR. The test output has:
Make sure to confirm that it is indeed testing what is intended here. AFAIU, it does that. |
radical
commented
Jul 27, 2022
@yamachu Thank you for your contribution! Great job 👍 |
yamachu
commented
Jul 27, 2022
@pavelsavara@radical |
radical
commented
Jul 28, 2022
Failures are unrelated. |
radical
commented
Jul 28, 2022
@yamachu This is only adding the |
This addition is to verify that config-src could be resolved when passed as an absolute path. |
In #72275 we fixed
locateFileto deal with relative file path or URL. We could also handle absolute path/URL. This PR is adding tests to prove it works.