Skip to content

Converge the AssemblyLoadContext scenario - #1235

Merged
Andy Jordan (andyleejordan) merged 13 commits into
masterfrom
andschwa/alc-wip
Jun 29, 2016
Merged

Andy Jordan (andyleejordan) merged 13 commits into
masterfrom
andschwa/alc-wip

Conversation

@andyleejordan

Copy link
Copy Markdown
Member

This resolves #839.

Dongbo Wang (@daxian-dbw) and I aren't super happy with some of the changes we've had to make here, and are hoping we get better solutions from the .NET Core team soon, but this is our proposed solution for now.

Note that this all goes away when GetAssemblies comes back, per #733.

This is probably still a bit of a work-in-progress, Dongbo and I need to go back over it tomorrow.

@andyleejordan

Andy Jordan (andyleejordan) commented Jun 29, 2016 •

Copy link
Copy Markdown
Member Author

Just a reminder: our CI tests don't test the publish scenario (though we've observed it working). We should probably add this ability to ensure everything is still working there too.

Fixed.

@andyleejordan

Copy link
Copy Markdown
Member Author

Dongbo Wang (@daxian-dbw) I was hoping this would also fix #682, but it doesn't seem to. We'll need to investigate it.

We should also document the generation of the type catalog, the assembly load context itself, and the alternatives we've investigated in the build internals document.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is a super simple LINQ query. If we're worried about performance, wouldn't we want to generate it when generating the type catalog itself?

@daxian-dbw Dongbo Wang (daxian-dbw) Jun 29, 2016 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, it's about performance. 1. LINQ is slow, even though clean. I think we should avoid LINQ query as much as possible. 2. the LINQ query you used makes many unnecessary calls to "Substring", because there are a lot duplicates in 'coreClrTypeCatalog.Values'. String operation is expensive, and we can make it more efficient by getting the unique set first.

I would love to generate it as part of generating the type catalog. Doing so in Github is easy, but in windows build is pretty hard because it requires an FCIB to update the TypeCatalogGen.exe. I don't want to do it :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it requires an FCIB to update the TypeCatalogGen.exe

I barely know what that means and it sounds like pain.

String operation is expensive, and we can make it more efficient by getting the unique set first.

I'm sure we could do this in LINQ too :P it's just a list comprehension.

@daxian-dbw

Copy link
Copy Markdown
Member

Andy Jordan (@andschwa) I assigned #682 to myself. This also repro in Nano PS.

Dongbo Wang (daxian-dbw) and others added 2 commits June 29, 2016 09:50
AppVeyor also does this, and it's the scenario our packages ship, so
it's what we should test.
@andyleejordan

Copy link
Copy Markdown
Member Author

Travis is having OS X infrastructure problems.

The Linux builds passed, I think we can consider this passing.

sergei (@vors), Dongbo Wang (@daxian-dbw) shall we merge?

@andyleejordan

Copy link
Copy Markdown
Member Author

Please note that it does disable xUnit tests until we've fixed how to start them 😦

@daxian-dbw

Copy link
Copy Markdown
Member

:shipit:

@andyleejordan
Andy Jordan (andyleejordan) deleted the andschwa/alc-wip branch June 29, 2016 19:01
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Converge the AssemblyLoadContext scenario
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix AssemblyLoadContext and TPA scenario

2 participants