Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Library Export refactor, phase 2 #2424

Closed
wants to merge 0 commits into from

Conversation

analogrelay
Copy link
Contributor

It's not quite finished yet (there's a Stack Overflow error in dnu build, yaaay!), but I wanted to open the review before I head off for my brief holiday.

/cc @davidfowl

@@ -8,12 +8,15 @@ namespace Microsoft.Dnx.Compilation
/// </summary>
public interface ILibraryExporter
{
LibraryExport GetLibraryExport(string name);
Copy link
Member

Choose a reason for hiding this comment

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

Prefer the old names. The exporter is providing exports, not actually exporting anything as a verb.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, but just called it GetExport and GetAllExports

_graph = _libraryInfoThunk().ToDictionary(ld => ld.Name,
StringComparer.Ordinal);
var libraries = _librariesThunk();
_graph = libraries.ToDictionary(l => l.Identity.Name, StringComparer.Ordinal);
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need so many dictionaries? We're going to need to do a serious review of all of our allocations because this looks like overkill.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I think we can combine these into a single dictionary storing a tuple (or a custom class). We need to be able to retrieve both the externally-used Library class and the internal LibraryDescription. I can merge the two into one dictionary though, either by putting Library on LibraryDescription or creating a tuple.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@analogrelay analogrelay deleted the anurse/2226-refactor-export-2 branch August 20, 2015 20:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants