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

Use GetExportedTypes where possible and filter nested types#723

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

Merged
filmor merged 8 commits intopythonnet:masterfromfilmor:implicit-assembly-loading
Nov 14, 2018

Conversation

filmor
Copy link
Member

@filmorfilmor commentedAug 21, 2018
edited
Loading

This is basically what@dmitriyse prepared in PR 528 without the event code that I don't understand.

What does this implement/fix? Explain your changes.

Useless calls to load dependencies based on private and nested types.

Does this close any currently open issues?

#703

Any other comments?

...

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

This is basically what@dmitriyse prepared in PR 528 without the eventcode that I don't understand.
@filmor
Copy link
MemberAuthor

@denfromufa Any idea for a test?

@den-run-ai
Copy link
Contributor

den-run-ai commentedAug 24, 2018
edited
Loading

@filmor i don't have a good option for a test (requires multiple assemblies), unless we ask to test out this PR from all users@goerch@pierce-martin@williamrubens@inna-w@Cronan@barrybriggs@zhukovgreen@AlexCatarino@bobred who reported this in the bug tracker:

#703
#643
#622
#603
#598
#564
#528
MSLNZ/msl-loadlib#6

@codecov
Copy link

codecovbot commentedAug 24, 2018

Codecov Report

Merging#723 intomaster willincrease coverage by0.01%.
The diff coverage is100%.

Impacted file tree graph

@@            Coverage Diff             @@##           master     #723      +/-   ##==========================================+ Coverage   77.12%   77.14%   +0.01%==========================================  Files          62       62                Lines        5583     5583                Branches      891      892       +1     ==========================================+ Hits         4306     4307       +1+ Misses        985      980       -5- Partials      292      296       +4
FlagCoverage Δ
#setup_linux64.74% <ø> (ø)⬆️
#setup_windows76.41% <100%> (+0.01%)⬆️
Impacted FilesCoverage Δ
src/runtime/assemblymanager.cs89.17% <100%> (+0.06%)⬆️
src/runtime/moduleobject.cs79.77% <0%> (-3.38%)⬇️
src/runtime/genericutil.cs82.81% <0%> (-3.13%)⬇️
src/runtime/runtime.cs91.37% <0%> (-0.04%)⬇️
src/runtime/CustomMarshaler.cs69.86% <0%> (+12.32%)⬆️

Continue to review full report at Codecov.

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

@filmor
Copy link
MemberAuthor

In that case, I'd lean towards merging this as is, if you don't object.

@den-run-ai
Copy link
Contributor

@filmor i think this PR still misses this essential part about handling exceptions from "transitive" dependencies, which I experienced before (I'm going to find a link), see this comment from@Cronan:

https://github.com/pythonnet/pythonnet/pull/528/files#r167013554

@@ -461,5 +458,13 @@ public static Type LookupType(string qname)
}
return null;
}

internal static Type[] GetTypes(Assembly a)
Copy link
Contributor

Choose a reason for hiding this comment

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

need a try-catch block here for transitive depedencies

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Isn't it an error, though, if we can't load transitive dependencies?

Copy link
Contributor

Choose a reason for hiding this comment

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

@filmor i think it is someone else's job to load transitive dependencies, e.g. the direct dependencies should find them on their own:

NuGet/Home#6614

@den-run-ai
Copy link
Contributor

den-run-ai commentedAug 24, 2018
edited
Loading

@filmor i agree with your comment about skipassemblyload:#528 (comment)

@codecov
Copy link

codecovbot commentedAug 27, 2018
edited
Loading

Codecov Report

Merging#723 intomaster willincrease coverage by8.32%.
The diff coverage is70%.

Impacted file tree graph

@@            Coverage Diff             @@##           master     #723      +/-   ##==========================================+ Coverage   68.55%   76.87%   +8.32%==========================================  Files           1       63      +62       Lines         283     5764    +5481       Branches        0      911     +911     ==========================================+ Hits          194     4431    +4237- Misses         89     1029     +940- Partials        0      304     +304
FlagCoverage Δ
#setup_linux68.55% <ø> (ø)⬆️
#setup_windows76.07% <70%> (?)
Impacted FilesCoverage Δ
src/runtime/assemblymanager.cs87.57% <70%> (ø)
src/runtime/pyansistring.cs100% <0%> (ø)
src/runtime/constructorbinder.cs54.54% <0%> (ø)
src/runtime/methodbinder.cs89.8% <0%> (ø)
src/runtime/Util.cs37.5% <0%> (ø)
src/runtime/delegatemanager.cs88.18% <0%> (ø)
src/runtime/eventbinding.cs46.51% <0%> (ø)
src/runtime/pyiter.cs77.27% <0%> (ø)
src/runtime/pynumber.cs100% <0%> (ø)
src/runtime/interop27.cs100% <0%> (ø)
... and54 more

Continue to review full report at Codecov.

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

@filmorfilmor added this to the2.4.0 milestoneAug 30, 2018
@filmor
Copy link
MemberAuthor

@denfromufa Can you please provide me with a test-case for the transitive dependency issue you mention? I have really no idea what this is about.

@filmorfilmor modified the milestone:2.4.0Oct 18, 2018
@filmorfilmor added the next labelOct 18, 2018
@den-run-aiden-run-ai self-assigned thisOct 18, 2018
// Return all types that were successfully loaded
return exc.Types.Where(x => x != null).ToArray();
}
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@denfromufa Is this what you had in mind?

Copy link
Contributor

Choose a reason for hiding this comment

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

@filmor this is even more than what i asked for :)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@den-run-aiden-run-aiden-run-ai approved these changes

@dmitriysedmitriyseAwaiting requested review from dmitriyse

@vmuriartvmuriartAwaiting requested review from vmuriart

@yagwebyagwebAwaiting requested review from yagweb

Assignees

@den-run-aiden-run-ai

Labels
None yet
Projects
None yet
Milestone
2.4.0
Development

Successfully merging this pull request may close these issues.

2 participants
@filmor@den-run-ai

[8]ページ先頭

©2009-2025 Movatter.jp