-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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] Fix ConvertDllsToWebCil stack dump on bad input to be error message with input path #101162
Conversation
Added a basic test. It has to be run manually right now, but it's a start and improvement over none. |
The test assemblies are changing the prebuilts |
Not sure what that means. Is there an issue with this PR? |
I was referring to the failure of
|
src/tasks/tests/tests.sln
Outdated
@@ -0,0 +1,31 @@ | |||
|
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.
Please don't check in solution files unless they are necessary.
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.
Generally folks will want both tests and impl projects open in VS. what's the recommended way to do that - create a solution manually?
@@ -0,0 +1,18 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> |
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.
If we do this, then I would move the src under src/tasks/src
same as we do libraries under "src/libraries".
<ItemGroup> | ||
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildFrameworkVersion)" /> | ||
<PackageReference Include="Moq" Version="$(MoqVersion)" /> | ||
</ItemGroup> |
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.
Because of this, this project gets always built, even in an official build which doesn't run tests. We want to minimize the external dependencies that we restore and use during an official build.
I think tasks.proj should be changed so that task tests are only built when requested.
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.
What's the right way to do that?
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.
You would need to define a new subset in Subsets.props: tasks.tests. Then if that subset is passed in you can pass an additional property to tasks.proj:
Line 15 in 56ee7c5
<MSBuild Projects="$(RepoTasksDir)tasks.proj" |
i.e.
<Properties Condition="...">IncludeTaskTests=true</Properties>
Then in tasks.proj you would change this line:
Line 3 in 56ee7c5
<ProjectReference Include="$(MSBuildThisFileDirectory)**\*.csproj" /> |
to something like
<ProjectReference Include="$(MSBuildThisFileDirectory)**\*.csproj" />
<ProjectReference Remove="$(MSBuildThisFileDirectory)tests\**\*.csproj" Condition="'$(IncludeTaskTests)' != 'true'" />
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.
We don't have test infrastructure support for tasks. We would need to change Subsets.props and/or YML for that. It might be easier to just move the entire task and the tests under src/libraries.
old related issue - #79010 |
I didn't set out to tackle the problem of creating test infrastructure here and probably don't have time. Thoughts about just checking in the fix without the test? Reasoning: none of the others have tests; this test passes when run explicitly. @lewing ? I can create an issue to create test infra if I do this. |
I sounds good to me. |
The fix is fine, and while tests for the tasks feel simple sometimes the things that feel simple are actually harder than their benefit. |
This reverts commit 9d15d5d.
OK, I reverted the tests but left in history in this PR so they can be grabbed in future when someone sets up unit tests for this assembly. |
merging main again because this should pass now and I'd like to see the results if it doesn't |
|
@ilonatommy please take a look |
… message with input path (dotnet#101162)
… message with input path (dotnet#101162)
Fix #101154
It looks like there are no unit tests for this assembly. Should we have them? It is exercised as a whole as part of all the Wasm.Build.Tests.
View diff with whitespace disabled: https://github.com/dotnet/runtime/pull/101162/files?diff=split&w=1