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

Delete infra changes #50789

Merged
merged 2 commits into from
Apr 7, 2021
Merged

Delete infra changes #50789

merged 2 commits into from
Apr 7, 2021

Conversation

pgovind
Copy link

@pgovind pgovind commented Apr 6, 2021

Clean up some infra changes that went into #48527. These changes are now unnecessary with #50593

@ghost
Copy link

ghost commented Apr 6, 2021

Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

Clean up some infra changes that went into #48527. These changes are now unnecessary with #50593

Author: pgovind
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@pgovind pgovind requested a review from eerhardt April 6, 2021 18:05
@pgovind pgovind added linkable-framework Issues associated with delivering a linker friendly framework and removed area-Infrastructure-libraries labels Apr 6, 2021
@ghost
Copy link

ghost commented Apr 6, 2021

Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @tannergooding, @sbomer
See info in area-owners.md if you want to be subscribed.

Issue Details

Clean up some infra changes that went into #48527. These changes are now unnecessary with #50593

Author: pgovind
Assignees: -
Labels:

linkable-framework

Milestone: -

Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can all these infra be helpful in the future?

@pgovind
Copy link
Author

pgovind commented Apr 6, 2021

Can all these infra be helpful in the future?

Caveat that I don't completely understand how these changes work. These changes could be helpful in the future, but are not needed right now. IIUC, these changes will preserve mscorlib.dll in a trimmed app. However, mscorlib.dll is just a facade, so the linker will try to eliminate the type forwards completely (and replace them with the real references?) such that mscorlib.dll is not present in the final output. So, if another scenario pops up where we need mscorlib.dll to be present in the final output, we'll need these changes, but we can delete them now.

@ghost
Copy link

ghost commented Apr 6, 2021

Hello @pgovind!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@@ -1,12 +1,6 @@
<Project DefaultTargets="Build">
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<ItemGroup>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you leave these in place? The issue with the current behavior is that as soon as someone adds one TestConsoleAppSourceFiles item, the implicitly defined ones go away and the tests don't run.

I wish we had one model in these tests.

cc @joperezr

Copy link
Author

@pgovind pgovind Apr 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I remember that. That's why I deleted all the TestConsoleAppSourceFiles Include=... lines. That would mean every file gets included and tested right? Anyway, this is just my curiosity. I'll add those lines back.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you remove all of the TestConsoleAppSourceFiles items, then the infra searches for all .cs files in the current directory. As soon as you add 1 TestConsoleAppSourceFiles item, it stops doing that. I want us to stop relying on the implicit behavior, so people don't make mistakes in the future.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah got it. Fixed now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While @eerhardt point is correct in that the model is not ideal so one inclusion overrides the default, I think you are fine to keep it the way you had it (with them removed) since it would effectively be the same thing here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you remove all of the TestConsoleAppSourceFiles items, then the infra searches for all .cs files in the current directory. As soon as you add 1 TestConsoleAppSourceFiles item, it stops doing that. I want us to stop relying on the implicit behavior, so people don't make mistakes in the future.

I see, We could easily just remove the automatic globbing if you think that would be better. I'm happy to take care of that and find all Trimming tests depending on it and moving them to the manual specification instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other option would be to make it work like all other globbing behavior in projects (for example, the *.cs Compile globbing). If I don't want a .cs file to be a top level test, I write

<TestConsoleAppSourceFiles Remove="SharedHelperFile.cs" />.

And if I need to set some metadata items for a specific file I write:

<TestConsoleAppSourceFiles Update="MyTest.cs" SomeSwitch="true" />.

And then by default the globbing just works like people normally expect - it is always there. And adding/updating/removing the TestConsoleAppSourceFiles item doesn't affect other tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd need to check if the Update part will work in this case since globbing will set the itemspec as the full path and I'm not sure if just filename and extension would match and appropriately set the switch, but I'll take a look to see if this could be done.

@pgovind pgovind removed the auto-merge label Apr 6, 2021
Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @pgovind !

@pgovind pgovind merged commit c320071 into dotnet:main Apr 7, 2021
@pgovind pgovind deleted the fix_typeconverter branch April 7, 2021 20:31
@ghost ghost locked as resolved and limited conversation to collaborators May 7, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants