-
Notifications
You must be signed in to change notification settings - Fork 76
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
First task to create a nuget package and remove sources from mono/mono #288
base: main
Are you sure you want to change the base?
Conversation
…e in netstandard. Changing projects to use new csproj style.
<PackageReference Include="Newtonsoft.Json"> | ||
<Version>10.0.3</Version> | ||
</PackageReference> | ||
<ProjectReference Include="..\Mono.Debugging\Mono.Debugging.csproj" /> |
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.
Missing marking projects as private.
AsyncResult result = (AsyncResult) asyncResult; | ||
LaunchCallback cb = (LaunchCallback) result.AsyncDelegate; | ||
return cb.EndInvoke (asyncResult); | ||
asyncResult.Wait (); |
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.
.Wait()
is not needed if we're doing .Result
.
One other remark is that we probably don't want to force a .Result
here. Maybe we need a public static Task<VirtualMachine> Launch()
?
@@ -111,20 +111,19 @@ public static IAsyncResult BeginLaunch (ProcessStartInfo info, AsyncCallback cal | |||
socket.Close (); | |||
}; | |||
|
|||
LaunchCallback c = new LaunchCallback (LaunchInternal); | |||
return c.BeginInvoke (p, info, socket, callback, socket); | |||
Task<VirtualMachine> t3 = Task<VirtualMachine>.Run (() => { |
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.
Doing a Task.Run
here does not mirror previous functionality. Maybe simplify it to:
return LaunchInternal (p, info, socket)
.ContinueWith (antecendent => callback (antecendent));
{ | ||
return BeginLaunch (info, callback, null); | ||
} | ||
|
||
public static IAsyncResult BeginLaunch (ProcessStartInfo info, AsyncCallback callback, LaunchOptions options) | ||
public static Task<VirtualMachine> BeginLaunch (ProcessStartInfo info, Action<Task<VirtualMachine>> callback, LaunchOptions options) |
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.
Are we ok with API breakages?
ListenCallback c = new ListenCallback (ListenInternal); | ||
return c.BeginInvoke (dbg_sock, con_sock, callback, con_sock ?? dbg_sock); | ||
|
||
Task<VirtualMachine> t = Task<VirtualMachine>.Run (() => { |
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.
Same as above:
return ListenInternal (dbg_sock, conn_sock)
.ContinueWith (antecendent => callback (antecendent));
Just a heads up - there's some kind of Mono.Debugger.Soft package already published (by us?) in 2017: https://www.nuget.org/packages/Mono.Debugger.Soft/ |
Any plans to complete this? (At least the part about moving to SDK-style projects.) We need this for Xamarin.Android in order to build with |
This comment does not make sense to me, as public documentation states that these types exist ~everywhere:
Note in particular:
Why do these types need to be removed? |
The
|
|
There is a blog post detailing something about this: https://devblogs.microsoft.com/dotnet/migrating-delegate-begininvoke-calls-for-net-core/ |
Removing usage of AsyncCallback and AsyncResult, this is not available in netstandard.
Changing projects to use new csproj style.