Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Custom Symbol/Library loading logic #84

Merged
merged 13 commits into from
Jun 30, 2019
Merged

[WIP] Custom Symbol/Library loading logic #84

merged 13 commits into from
Jun 30, 2019

Conversation

sunkin351
Copy link
Contributor

This PR will add the ability for library users to add user loading logic to both library and library symbol loading.

Unfortunately, this is currently untested, Windows tests won't compile on my current setup

With these changes, it is possible to support API's like OpenGL and Vulkan because they export methods to look up the rest of their API's.

Copy link
Owner

@Nihlus Nihlus left a comment

Choose a reason for hiding this comment

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

Awesome stuff! I've left some general nitpicks, but all in all this looks great.

AdvancedDLSupport/Loaders/PlatformLoaderBase.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBase.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBase.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBase.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBuilder.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBuilder.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBuilder.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBuilder.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBuilder.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBuilder.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBase.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBase.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/NativeLibraryBase.cs Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 20, 2019

Codecov Report

Merging #84 into master will increase coverage by 0.25%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
+ Coverage   89.21%   89.46%   +0.25%     
==========================================
  Files         108      109       +1     
  Lines        5172     5230      +58     
  Branches      444      445       +1     
==========================================
+ Hits         4614     4679      +65     
+ Misses        552      545       -7     
  Partials        6        6
Impacted Files Coverage Δ
...Tests/Tests/Integration/CustomLoadingLogicTests.cs 100% <100%> (ø)
AdvancedDLSupport/NativeLibraryBuilder.cs 83.2% <100%> (+0.6%) ⬆️
AdvancedDLSupport/NativeLibraryBase.cs 100% <100%> (ø) ⬆️
AdvancedDLSupport/Loaders/PlatformLoaderBase.cs 93.33% <100%> (ø) ⬆️
...cedDLSupport/Reflection/IntrospectiveMemberBase.cs 79.16% <0%> (+2.77%) ⬆️
...LSupport/SymbolTransformation/SymbolTransformer.cs 61.36% <0%> (+4.54%) ⬆️
...upport.AOT.Tests/Fixtures/InitialCleanupFixture.cs 100% <0%> (+7.69%) ⬆️
...ncedDLSupport/Manglers/StdCallEntrypointMangler.cs 75% <0%> (+10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 956c568...341e59f. Read the comment docs.

AdvancedDLSupport/Loaders/ILibraryLoader.cs Outdated Show resolved Hide resolved
AdvancedDLSupport/Loaders/ISymbolLoader.cs Outdated Show resolved Hide resolved
@@ -57,7 +58,7 @@ public abstract class PlatformLoaderBase : IPlatformLoader
/// <returns>A platform loader for the current platform..</returns>
/// <exception cref="PlatformNotSupportedException">Thrown if the current platform is not supported.</exception>
[PublicAPI, NotNull, Pure]
public static IPlatformLoader SelectPlatformLoader()
private static IPlatformLoader SelectPlatformLoader()
Copy link
Owner

Choose a reason for hiding this comment

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

Note to self: run an attribute cleanup sometime in the future.

@Nihlus Nihlus merged commit d8d5384 into Nihlus:master Jun 30, 2019
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.

2 participants