Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

LookupType returns the first type found#622

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Cronan wants to merge2 commits intopythonnet:masterfromCronan:lookup_type
Closed

LookupType returns the first type found#622

Cronan wants to merge2 commits intopythonnet:masterfromCronan:lookup_type

Conversation

Cronan
Copy link
Contributor

@CronanCronan commentedFeb 7, 2018
edited
Loading

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.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Add yourself toAUTHORS
  • Updated theCHANGELOG

@den-run-ai
Copy link
Contributor

den-run-ai commentedFeb 7, 2018
edited
Loading

@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.

@Cronan
Copy link
ContributorAuthor

@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)

@CronanCronan changed the titleLookupType returns public types firstLookupType returns the first type foundFeb 7, 2018
@CronanCronan mentioned this pull requestFeb 7, 2018
@codecov
Copy link

codecovbot commentedFeb 7, 2018
edited
Loading

Codecov Report

Merging#622 intomaster willincrease coverage by1.91%.
The diff coverage is100%.

Impacted file tree graph

@@           Coverage Diff            @@##           master   #622      +/-   ##========================================+ Coverage   75.09%    77%   +1.91%========================================  Files          60     64       +4       Lines        5480   5614     +134       Branches      864    890      +26     ========================================+ Hits         4115   4323     +208+ Misses       1064   1002      -62+ Partials      301    289      -12
FlagCoverage Δ
#setup_linux69.42% <ø> (ø)⬆️
#setup_windows76.18% <100%> (+2.11%)⬆️
Impacted FilesCoverage Δ
src/runtime/assemblymanager.cs90.05% <100%> (+1.34%)⬆️
src/runtime/runtime.cs90.98% <0%> (-0.76%)⬇️
src/runtime/interop.cs95.73% <0%> (-0.49%)⬇️
src/runtime/pythonengine.cs78.31% <0%> (-0.26%)⬇️
src/runtime/interop33.cs100% <0%> (ø)
src/runtime/interop34.cs100% <0%> (ø)
src/runtime/interop35.cs100% <0%> (ø)
src/runtime/interop36.cs100% <0%> (ø)
src/runtime/typemanager.cs84.03% <0%> (+0.34%)⬆️
src/runtime/moduleobject.cs85.05% <0%> (+0.57%)⬆️
... and7 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update8629e1e...1cfc844. Read thecomment docs.

@den-run-aiden-run-ai mentioned this pull requestFeb 7, 2018
@Cronan
Copy link
ContributorAuthor

@denfromufa Added a test, merged from#621, and squashed.

@den-run-ai
Copy link
Contributor

@Cronan let's wait for CI to finish

@Cronan
Copy link
ContributorAuthor

@denfromufa Sorry (sadface)

@dmitriyse
Copy link
Contributor

dmitriyse commentedFeb 7, 2018
edited
Loading

I also have related PR#528

@dmitriyse
Copy link
Contributor

That exists since summer 2017.

@den-run-ai
Copy link
Contributor

@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.

@Cronan
Copy link
ContributorAuthor

@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?

@den-run-ai
Copy link
Contributor

@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.

@den-run-ai
Copy link
Contributor

@Cronan also checkout the featured branch:

https://github.com/pythonnet/pythonnet/tree/featured

@Cronan
Copy link
ContributorAuthor

Thanks @denfromufa

@Cronan
Copy link
ContributorAuthor

@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.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@Cronan@den-run-ai@dmitriyse

[8]ページ先頭

©2009-2025 Movatter.jp