You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What does this implement/fix? Explain your changes.
In .Net Core 2.0, there are public and private versions of the same types in different assemblies. For example, there is a private version of System.Environment in mscorlib.dll, and a public version in System.Runtime.Extensions.dll. The existing code returns the first matching type found, even if it's private, and even if there are other matching types in other assemblies.
The new version of this function returns the first public type, or the first type found.
@Cronan i can't find any reference to this particular issue, i understand that writing unit test for this is hard, but please provide a reference comment or exception traceback at least.
@denfromufa The issue in #613from System import Environment is caused by this bug - it occurs in Linux using .Net Core 2.0, when using the code from #612.
I'll add a test that exercises the import above, but it will only fail when #612 is merged into master (and if the above code isn't added)
Cronan
changed the title
LookupType returns public types first
LookupType returns the first type found
Feb 7, 2018
@dmitriyse this PR addresses one stand-alone issue, I'm in favor of merging your PR, if it totally covers this case and if you cherry pick the unit test from this PR to your PR.
@dmitriyse @denfromufa It seems I spent a lot of time yesterday debugging and fixing an issue that has already been fixed, but was left unreviewed and unmerged. :-(
What is hard about this project right now is the large number of issues, combined with a large number of unreviewed and unmerged PRs, which make it increasingly difficult for new people to work on the project. Obviously #610 was meant to address this, but I think we also need to work through the PRs, and either merge, fix, or close them. Maybe we could take them one at a time, and focus in on them?
@Cronan with new rules in issue #610 we should be able to faster merge existing PRs at least between me and @dmitriyse. I have more time this year than in second half of 2017. Soon we may add more reviewers from active people with few accepted PRs.
@denfromufa I'm going to close this, I'll add the test (with a few others) by itself as a separate PR to extend code coverage. @dmitriyse I'm not sure #528 actually address the issue of importing System.Environment in dotnetcoreapp2.0 on Linux, but I may be wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix? Explain your changes.
In .Net Core 2.0, there are public and private versions of the same types in different assemblies. For example, there is a private version of System.Environment in mscorlib.dll, and a public version in System.Runtime.Extensions.dll. The existing code returns the first matching type found, even if it's private, and even if there are other matching types in other assemblies.
The new version of this function returns the first public type, or the first type found.
Does this close any currently open issues?
This closes some parts of #613
Checklist
Check all those that are applicable and complete.
AUTHORSCHANGELOG