-
Notifications
You must be signed in to change notification settings - Fork 327
SerDe referenced assemblies #180
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
Conversation
@stephentoub can you take a look and let me know if this is on the right track or if there may be better alternatives? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't fully understand the scenario you are solving here, nor why you need to serialize all the reference assemblies to the worker.
Typically, the referenced assemblies should either be next to the UDF assembly, or contained in the .NET core/framework directory. We should just be able to resolve the referenced assemblies on the worker by looking in one folder: where the UDF assembly is.
Below are some examples where class In this case the var ec = new ExternalClass();
Func<Column, Column> udf1 = Udf<string, string>(
str =>
{
ec.Method1();
$"hello {str}!"
}); In this example where the Func<Column, Column> udf2 = Udf<string, string>(
str =>
{
var ec = new ExternalClass();
ec.Method1();
$"hello {str}!"
});
I think there are a couple ways to approach this problem.
|
That's what MSBuild does when it tries resolving assemblies that a Task depends on: |
I believe I've addressed all the comments. Let me know if there's anything else I should revisit. |
@@ -0,0 +1,8 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just put this project next to the unit tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to src/csharp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A delegate references assemblies that is not easily ascertained by inspecting its target, method and fields. This PR addresses this by adding a assembly resolve event handler which will search the probing path and look for some combination of the assembly's simple name and known assembly extensions.