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

js share by reference formatted values #3032

Merged
merged 3 commits into from
Jun 12, 2023
Merged

Conversation

colombod
Copy link
Member

@colombod colombod commented Jun 12, 2023

Variable shared from js are now correctly parsed
image

if is byref OR is not formatted value


simplify condition


proxykernel should not remove targetkernel name


revert proxy kernel changes


check is proxy remoteuri


clean test
@@ -494,6 +494,43 @@ public async Task value_option_is_required()
.Which.Message.Should().Be("Option '--value' is required.");
}

[Fact]
public async Task ProxyKernels_can_share_values()
Copy link
Contributor

Choose a reason for hiding this comment

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

This test name should be more specific.

Copy link
Member Author

Choose a reason for hiding this comment

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

this ProxyKernels_sharing_values_receives_them_as_deserialized_values


ValueProduced valueProduced;
if (
sourceKernel?.KernelInfo.IsProxy == false
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe KernelInfo can ever be null.

Copy link
Member Author

Choose a reason for hiding this comment

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

if the kernel is not found. that is the case when using @input:x

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah right.

@@ -383,6 +361,8 @@ ValueOptionResult ParseValueOption(ArgumentResult argResult)
isByref = false;
}

var valueSourceKernel = destinationKernel.RootKernel.FindKernelByName(sourceValueName);
Copy link
Contributor

Choose a reason for hiding this comment

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

No longer needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

ops

@colombod colombod enabled auto-merge (rebase) June 12, 2023 22:09
@colombod colombod merged commit 8e07588 into dotnet:main Jun 12, 2023
@colombod colombod deleted the js_value_share branch June 13, 2023 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Variable sharing bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JavaScript array shared into C# is instantiated as a FormattedValue
2 participants