-
Notifications
You must be signed in to change notification settings - Fork 221
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
VB -> C# System.Linq.Expression needs special treatment #316
Comments
Thanks for raising this. It is indeed a tricky area. I'd be interested to see more of the details of VB's async leniency. Sometimes these things can be "fixed" during conversion to choose some c# that does what the vb compiler would have done. |
First, thanks for all your effort.
Converting old code to async can be messy so I don’t have any particular advice. It’s just the C# will complain about things like not having awaits and null exists whereas VB is lenient. I just need to clean up the code.
oh, one I forgot to mention – case sensitivity in converting imports to using. Another messy problem since you can’t know the case of the external reference by looking at the code locally. The more one is adept at the nuance of each language the more difficult it is to convert out of context. In other code (based on VB6 from 1990’s and converted to VB.Net and evolved) lots of implicit assumptions about modules dating to when it was a stand-alone COM module.
Finally it would be help to have an undo. To be prudent I do this manually and have to convert CSPROJ reference back to VBPROJ so it’s not a crisis – just a convenience.
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: GrahamTheCoder <notifications@github.com>
Sent: Tuesday, May 28, 2019 03:48
To: icsharpcode/CodeConverter <CodeConverter@noreply.github.com>
Cc: Bob Frankston <Github@bob.ma>; Author <author@noreply.github.com>
Subject: Re: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
Thanks for raising this. It is indeed a tricky area.
I'd be interested to see more of the details of VB's async leniency. Sometimes these things can be "fixed" during conversion to choose some c# that does what the vb compiler would have done.
—
You are receiving this because you authored the thread.
Reply to this email directly, <#316?email_source=notifications&email_token=ABJ4OND4NWUQEOKATYU7AETPXTPTJA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWLIPAY#issuecomment-496404355> view it on GitHub, or <https://github.com/notifications/unsubscribe-auth/ABJ4ONC7DM6FJXTBXED7WIDPXTPTJANCNFSM4HP57NEA> mute the thread. <https://github.com/notifications/beacon/ABJ4ONG62ZLRSA3O7R4EIQDPXTPTJA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWLIPAY.gif>
|
One quick thought on LINQ – a #pragma – like declaration globally or at the query. This can be a way to add knowledge.
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: Bob Frankston <bob19-0501@bobf.frankston.com>
Sent: Tuesday, May 28, 2019 07:16
To: 'icsharpcode/CodeConverter' <reply@reply.github.com>; 'icsharpcode/CodeConverter' <CodeConverter@noreply.github.com>
Cc: 'Bob Frankston' <Github@bob.ma>; 'Author' <author@noreply.github.com>
Subject: RE: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
First, thanks for all your effort.
Converting old code to async can be messy so I don’t have any particular advice. It’s just the C# will complain about things like not having awaits and null exists whereas VB is lenient. I just need to clean up the code.
oh, one I forgot to mention – case sensitivity in converting imports to using. Another messy problem since you can’t know the case of the external reference by looking at the code locally. The more one is adept at the nuance of each language the more difficult it is to convert out of context. In other code (based on VB6 from 1990’s and converted to VB.Net and evolved) lots of implicit assumptions about modules dating to when it was a stand-alone COM module.
Finally it would be help to have an undo. To be prudent I do this manually and have to convert CSPROJ reference back to VBPROJ so it’s not a crisis – just a convenience.
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: GrahamTheCoder <notifications@github.com>
Sent: Tuesday, May 28, 2019 03:48
To: icsharpcode/CodeConverter <CodeConverter@noreply.github.com>
Cc: Bob Frankston <Github@bob.ma>; Author <author@noreply.github.com>
Subject: Re: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
Thanks for raising this. It is indeed a tricky area.
I'd be interested to see more of the details of VB's async leniency. Sometimes these things can be "fixed" during conversion to choose some c# that does what the vb compiler would have done.
—
You are receiving this because you authored the thread.
Reply to this email directly, <#316?email_source=notifications&email_token=ABJ4OND4NWUQEOKATYU7AETPXTPTJA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWLIPAY#issuecomment-496404355> view it on GitHub, or <https://github.com/notifications/unsubscribe-auth/ABJ4ONC7DM6FJXTBXED7WIDPXTPTJANCNFSM4HP57NEA> mute the thread. <https://github.com/notifications/beacon/ABJ4ONG62ZLRSA3O7R4EIQDPXTPTJA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWLIPAY.gif>
|
Thanks. The case of something that works due to lenience in VB, but not in c# is the case I'm interested in. E.g. Does VB add an await automatically somewhere. Does await in vb do a null check behind the scenes that should be replicated when converted etc. I generally agree an undo function would be useful, mainly as a move towards a more step by step guide to conversion within the tool. For now I recommend using a version control system (such as git) to provide such functionality. However, I have attempted to provide a manual route, in the form of .bak files for files that are changed in the process (in addition to a confirmation dialog). A very simple script could automate restoring the bak files if there are a lot. Thanks, Graham. |
My use case is doing my own projects which have evolved over 20 years. The async was added in a shift from using threads and when it worked well-enough I moved on. I will tell when I do figure it out but more likely will just cleanup the code overall so may not know the key thing I could’ve gotten away with.
What would help most is the ability to do incremental changes and go back without losing the tweaks I had to make. This is why I like the ideas of pragmas for LINQ – I can capture the knowledge rather than having to repeat the process each iteration.
Making a copy of the whole directory and naming back the CSPROJ=>VBPROJ works adequately for me. I presume production shops have better procedures so no need to do too much to accommodate me.
Another general issue is reference VB modules from other VB code after it changes to C#. For now I put that project aside because of the need to change other project. Not sure how to write C# code that is fully transparent. (going the other way “using static” is easier).
In any case, thanks again for all your effort.
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: GrahamTheCoder <notifications@github.com>
Sent: Wednesday, May 29, 2019 18:17
To: icsharpcode/CodeConverter <CodeConverter@noreply.github.com>
Cc: Bob Frankston <Github@bob.ma>; Author <author@noreply.github.com>
Subject: Re: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
Thanks. The case of something that works due to lenience in VB, but not in c# is the case I'm interested in. E.g. Does VB add an await automatically somewhere. Does await in vb do a null check behind the scenes that should be replicated when converted etc.
I generally agree an undo function would be useful, mainly as a move towards a more step by step guide to conversion within the tool. For now I recommend using a version control system (such as git) to provide such functionality. However, I have attempted to provide a manual route, in the form of .bak files for files that are changed in the process (in addition to a confirmation dialog). A very simple script could automate restoring the bak files if there are a lot.
Just to check, is there a specific shortcoming you're finding with one of those approaches that doesn't suit your use cases? (Even their discoverability)
Thanks, Graham.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#316?email_source=notifications&email_token=ABJ4ONAJZ4YAMSN4GB33OBTPX36EFA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWQZK6Y#issuecomment-497128827> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ABJ4ONEZNJ7GMPQJSNFJDX3PX36EFANCNFSM4HP57NEA> . <https://github.com/notifications/beacon/ABJ4ONGFMFOY7PNX7KEJUS3PX36EFA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWQZK6Y.gif>
|
Next steps on this are to have a look at whether the equals operator in VB linq does the same as outside of linq, and whether we could detect a sql context for example and special case it. |
LINQ expressions are parsed with no semantics. It’s 100% up to the particular implementation to decide, at runtime, what to do. In fact some databases are case sensitive and some are not. So the only correct conversion is to leave it as-is and, fortunately, that means we don’t need pragmas … except … that you don’t necessarily know if a particular delegate will be used in LINQ or will be used as code. I’d have to dig deeper to know all the rules.
BTW, key insight on async. I think I get away with it in VB because I’m invoking async methods in non-async context so VB doesn’t care.
Also to declare an async method parameter I had to convert “foo of action(of object)” to “foo of func(of object,task)” rather than an async keyword as I do in TypeScript (I have far more experience with async in TS than in C#). I did have trouble in VB with
a.ForEach(func(a) await handler(a0)
VB gave me now way to make the containing sub async so I had to kludge it and created a handler that recursed down each entry in A so that there are just simple async invocations. There is probably a far better way of doing it but whatever I can make work. Caveat – I haven’t tested the new code in production yet.
Private Async Function SendDeviceStatusStepHack(wsdrs As IEnumerable(Of WSDevReport), SendJSON As Func(Of Object, Task)) As Task
If wsdrs.Count = 0 Then Return
Await SendJSON(wsdrs(0))
Await SendDeviceStatusStepHack(wsdrs.Skip(1), SendJSON)
End Function
Friend Async Function SendDeviceStatus2(dev As iiDevice, SendJSON As Func(Of Object, Task)) As Task
Dim wsds = New WSDevicesReport(dev) ' Get matching devices
' wsds.devices.ForEach(Async Sub(wsdr) Await SendJSON(wsdr))
Await SendDeviceStatusStepHack(wsds.devices, SendJSON)
End Function
This was the version before I did the conversion to async
Friend Sub SendDeviceStatus(dev As iiDevice, SendJSON As Action(Of Object))
Dim wsds = New WSDevicesReport(dev) ' Get matching devices
wsds.devices.ForEach(Sub(wsdr) SendJSON(wsdr))
End Sub
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: GrahamTheCoder <notifications@github.com>
Sent: Sunday, June 2, 2019 17:10
To: icsharpcode/CodeConverter <CodeConverter@noreply.github.com>
Cc: Bob Frankston <Github@bob.ma>; Author <author@noreply.github.com>
Subject: Re: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
Next steps on this are to have a look at whether the equals operator in VB linq does the same as outside of linq, and whether we could detect a sql context for example and special case it.
—
You are receiving this because you authored the thread.
Reply to this email directly, <#316?email_source=notifications&email_token=ABJ4ONCPJWMWLV5GYVSYZZDPYQZLXA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWX6CZY#issuecomment-498065767> view it on GitHub, or <https://github.com/notifications/unsubscribe-auth/ABJ4OND6XAYP3GDGD6MK3JDPYQZLXANCNFSM4HP57NEA> mute the thread. <https://github.com/notifications/beacon/ABJ4ONCPFOSQ42ZG3NKTR3TPYQZLXA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWX6CZY.gif>
|
Just an FYI I looked into how to return a null task object to keep VB happy
Return Task.FromResult(Of Object)(Nothing)
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: Bob Frankston <bob19-0501@bobf.frankston.com>
Sent: Sunday, June 2, 2019 17:31
To: 'icsharpcode/CodeConverter' <reply@reply.github.com>; 'icsharpcode/CodeConverter' <CodeConverter@noreply.github.com>
Cc: 'Bob Frankston' <Github@bob.ma>; 'Author' <author@noreply.github.com>
Subject: RE: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
LINQ expressions are parsed with no semantics. It’s 100% up to the particular implementation to decide, at runtime, what to do. In fact some databases are case sensitive and some are not. So the only correct conversion is to leave it as-is and, fortunately, that means we don’t need pragmas … except … that you don’t necessarily know if a particular delegate will be used in LINQ or will be used as code. I’d have to dig deeper to know all the rules.
BTW, key insight on async. I think I get away with it in VB because I’m invoking async methods in non-async context so VB doesn’t care.
Also to declare an async method parameter I had to convert “foo of action(of object)” to “foo of func(of object,task)” rather than an async keyword as I do in TypeScript (I have far more experience with async in TS than in C#). I did have trouble in VB with
a.ForEach(func(a) await handler(a0)
VB gave me now way to make the containing sub async so I had to kludge it and created a handler that recursed down each entry in A so that there are just simple async invocations. There is probably a far better way of doing it but whatever I can make work. Caveat – I haven’t tested the new code in production yet.
Private Async Function SendDeviceStatusStepHack(wsdrs As IEnumerable(Of WSDevReport), SendJSON As Func(Of Object, Task)) As Task
If wsdrs.Count = 0 Then Return
Await SendJSON(wsdrs(0))
Await SendDeviceStatusStepHack(wsdrs.Skip(1), SendJSON)
End Function
Friend Async Function SendDeviceStatus2(dev As iiDevice, SendJSON As Func(Of Object, Task)) As Task
Dim wsds = New WSDevicesReport(dev) ' Get matching devices
' wsds.devices.ForEach(Async Sub(wsdr) Await SendJSON(wsdr))
Await SendDeviceStatusStepHack(wsds.devices, SendJSON)
End Function
This was the version before I did the conversion to async
Friend Sub SendDeviceStatus(dev As iiDevice, SendJSON As Action(Of Object))
Dim wsds = New WSDevicesReport(dev) ' Get matching devices
wsds.devices.ForEach(Sub(wsdr) SendJSON(wsdr))
End Sub
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: GrahamTheCoder <notifications@github.com <mailto:notifications@github.com> >
Sent: Sunday, June 2, 2019 17:10
To: icsharpcode/CodeConverter <CodeConverter@noreply.github.com <mailto:CodeConverter@noreply.github.com> >
Cc: Bob Frankston <Github@bob.ma <mailto:Github@bob.ma> >; Author <author@noreply.github.com <mailto:author@noreply.github.com> >
Subject: Re: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
Next steps on this are to have a look at whether the equals operator in VB linq does the same as outside of linq, and whether we could detect a sql context for example and special case it.
—
You are receiving this because you authored the thread.
Reply to this email directly, <#316?email_source=notifications&email_token=ABJ4ONCPJWMWLV5GYVSYZZDPYQZLXA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWX6CZY#issuecomment-498065767> view it on GitHub, or <https://github.com/notifications/unsubscribe-auth/ABJ4OND6XAYP3GDGD6MK3JDPYQZLXANCNFSM4HP57NEA> mute the thread. <https://github.com/notifications/beacon/ABJ4ONCPFOSQ42ZG3NKTR3TPYQZLXA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWX6CZY.gif>
|
OK, I couldn’t resist. Converting sloppy (Je ne sais pas pourquoi) asynchronous code is scary. I used threading rather than callbacks in the early days for the same reason that async is superior to tasks/promises. Converting to async is tricky and the implicit semantics be difficult as in knowing when return as “Task” is the same as async – it seems to be.
Why use Operators.CompareString rather than string.Compare which doesn’t require including an extra library?
Also why DateAndTime vs DateTime?
I had to remove all those returns I put in for VB
Minor – generating a “break” after a “throw” .. compiler is picky about unreachable code
var foo = (int x) =>
doesn’t work. It needs to be a Func<> or, better simply an inline procedure as in
foo(int x) {
It seems to work now … thanks … or so I think … websockets seems to flake out so …
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: Bob Frankston <bob19-0501@bobf.frankston.com>
Sent: Monday, June 3, 2019 11:19
To: 'icsharpcode/CodeConverter' <reply@reply.github.com>; 'icsharpcode/CodeConverter' <CodeConverter@noreply.github.com>
Subject: RE: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
Just an FYI I looked into how to return a null task object to keep VB happy
Return Task.FromResult(Of Object)(Nothing)
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: Bob Frankston <bob19-0501@bobf.frankston.com>
Sent: Sunday, June 2, 2019 17:31
To: 'icsharpcode/CodeConverter' <reply@reply.github.com>; 'icsharpcode/CodeConverter' <CodeConverter@noreply.github.com>
Cc: 'Bob Frankston' <Github@bob.ma>; 'Author' <author@noreply.github.com>
Subject: RE: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
LINQ expressions are parsed with no semantics. It’s 100% up to the particular implementation to decide, at runtime, what to do. In fact some databases are case sensitive and some are not. So the only correct conversion is to leave it as-is and, fortunately, that means we don’t need pragmas … except … that you don’t necessarily know if a particular delegate will be used in LINQ or will be used as code. I’d have to dig deeper to know all the rules.
BTW, key insight on async. I think I get away with it in VB because I’m invoking async methods in non-async context so VB doesn’t care.
Also to declare an async method parameter I had to convert “foo of action(of object)” to “foo of func(of object,task)” rather than an async keyword as I do in TypeScript (I have far more experience with async in TS than in C#). I did have trouble in VB with
a.ForEach(func(a) await handler(a0)
VB gave me now way to make the containing sub async so I had to kludge it and created a handler that recursed down each entry in A so that there are just simple async invocations. There is probably a far better way of doing it but whatever I can make work. Caveat – I haven’t tested the new code in production yet.
Private Async Function SendDeviceStatusStepHack(wsdrs As IEnumerable(Of WSDevReport), SendJSON As Func(Of Object, Task)) As Task
If wsdrs.Count = 0 Then Return
Await SendJSON(wsdrs(0))
Await SendDeviceStatusStepHack(wsdrs.Skip(1), SendJSON)
End Function
Friend Async Function SendDeviceStatus2(dev As iiDevice, SendJSON As Func(Of Object, Task)) As Task
Dim wsds = New WSDevicesReport(dev) ' Get matching devices
' wsds.devices.ForEach(Async Sub(wsdr) Await SendJSON(wsdr))
Await SendDeviceStatusStepHack(wsds.devices, SendJSON)
End Function
This was the version before I did the conversion to async
Friend Sub SendDeviceStatus(dev As iiDevice, SendJSON As Action(Of Object))
Dim wsds = New WSDevicesReport(dev) ' Get matching devices
wsds.devices.ForEach(Sub(wsdr) SendJSON(wsdr))
End Sub
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: GrahamTheCoder <notifications@github.com <mailto:notifications@github.com> >
Sent: Sunday, June 2, 2019 17:10
To: icsharpcode/CodeConverter <CodeConverter@noreply.github.com <mailto:CodeConverter@noreply.github.com> >
Cc: Bob Frankston <Github@bob.ma <mailto:Github@bob.ma> >; Author <author@noreply.github.com <mailto:author@noreply.github.com> >
Subject: Re: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
Next steps on this are to have a look at whether the equals operator in VB linq does the same as outside of linq, and whether we could detect a sql context for example and special case it.
—
You are receiving this because you authored the thread.
Reply to this email directly, <#316?email_source=notifications&email_token=ABJ4ONCPJWMWLV5GYVSYZZDPYQZLXA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWX6CZY#issuecomment-498065767> view it on GitHub, or <https://github.com/notifications/unsubscribe-auth/ABJ4OND6XAYP3GDGD6MK3JDPYQZLXANCNFSM4HP57NEA> mute the thread. <https://github.com/notifications/beacon/ABJ4ONCPFOSQ42ZG3NKTR3TPYQZLXA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWX6CZY.gif>
|
I'm open to using DateTime as part of a proper handling of #174, it actually did that sloppily until it was recently reverted in #261 I've just merged #317 which hopefully improves string comparison in some cases. The summary of why it sometimes uses a different method is because the methods do different things, and tracking down thousands of these little changes post conversion is not fun |
As an FYI – I had to revert. For some reason the WebSocket wasn’t working right and I haven’t had a chance to track it down. I’ve got a lot of resilience my code so failures aren’t immediately visible.
That said, I very much appreciate the tools and will continue to try
DateAndTIme – ah ha – I just wrote “now” and didn’t realize in VB it was DateAndTime.now. I tried to eliminate the VB libraries which generated some errors. Am also moving more to string interpolation which should reduce some of the need for explicit conversion.
This is minor but converting from an enum using an implicit conversation generates an error
Dim foo as whatever = enum.none
Would it be correct to convert to?
Dim foo = ctype(enum.none, whatever)
BTW, when the error says “see comments” where are the comments?
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: GrahamTheCoder <notifications@github.com>
Sent: Monday, June 3, 2019 14:25
To: icsharpcode/CodeConverter <CodeConverter@noreply.github.com>
Cc: Bob Frankston <Github@bob.ma>; Author <author@noreply.github.com>
Subject: Re: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
I'm open to using DateTime as part of a proper handling of #174 <#174> , it actually did that sloppily until it was recently reverted in #261 <#261>
I've just merged #317 <#317> which hopefully improves string comparison in some cases. The summary of why it sometimes uses a different method is because the methods do different things, and tracking down thousands of these little changes post conversion is not fun
—
You are receiving this because you authored the thread.
Reply to this email directly, <#316?email_source=notifications&email_token=ABJ4ONFE4GJHV53IDTCZ6VTPYVOWJA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW2ITSI#issuecomment-498371017> view it on GitHub, or <https://github.com/notifications/unsubscribe-auth/ABJ4ONFME2R5X3TE5A2CFFLPYVOWJANCNFSM4HP57NEA> mute the thread. <https://github.com/notifications/beacon/ABJ4ONBIN4A7KGGIWMT5VXTPYVOWJA5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW2ITSI.gif>
|
Sorry to hear it didn't work yet. Glad the tools helped a bit though. The enum conversion sounds plausible off the top of my head, though if you're about to convert it, perhaps use something like Convert.ToInt32(myEnum.None) that will stay the same. In c# it can just be a cast like (int) myEnum.None |
The positive side is that I’m finally getting my act together and trying to master async in C# which has for more mechanism that JavaScript.
As to the conversion – I’m converting to an object. The reasons go back into some problems I ran into yeas ago with named instances that were plan A. It actually returns a new object each time which made more sense when it was a structure.
Public Shared Widening Operator CType(ByVal hce As HCActionEnum) As HCAction
Return New HCAction(hce)
End Operator
Bob Frankston
<https://Frankston.com> https://Frankston.com
From: GrahamTheCoder <notifications@github.com>
Sent: Monday, June 3, 2019 18:22
To: icsharpcode/CodeConverter <CodeConverter@noreply.github.com>
Cc: Bob Frankston <Github@bob.ma>; Author <author@noreply.github.com>
Subject: Re: [icsharpcode/CodeConverter] VB -> C# LINQ Etc. (#316)
Sorry to hear it didn't work yet. Glad the tools helped a bit though.
Ah yes, VB has all kinds of special oddities that people don't realise they're even using. Makes things tricky!
The enum conversion sounds plausible off the top of my head, though if you're about to convert it, perhaps use something like Convert.ToInt32(myEnum.None) that will stay the same. In c# it can just be a cast like (int) myEnum.None
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#316?email_source=notifications&email_token=ABJ4ONFIZUODXANFOXWUNJTPYWKP5A5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW23N3Q#issuecomment-498448110> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ABJ4ONCBRAAUHCVFUNLJZCLPYWKP5ANCNFSM4HP57NEA> . <https://github.com/notifications/beacon/ABJ4ONCQ75L4DKEWFDJGLETPYWKP5A5CNFSM4HP57NEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW23N3Q.gif>
|
Renamed this issue to focus on linq now the async issues are captured in #478 |
* 9.0.3 * Do not run default code from UI against real converter to save on execution costs * Apply timeout to simplification * 9.0.4 * Bump node-forge from 0.10.0 to 1.3.1 in /Web/ClientApp Bumps [node-forge](https://github.com/digitalbazaar/forge) from 0.10.0 to 1.3.1. - [Release notes](https://github.com/digitalbazaar/forge/releases) - [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md) - [Commits](digitalbazaar/forge@0.10.0...v1.3.1) --- updated-dependencies: - dependency-name: node-forge dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Bump json-schema from 0.3.0 to 0.4.0 in /Web/ClientApp Bumps [json-schema](https://github.com/kriszyp/json-schema) from 0.3.0 to 0.4.0. - [Release notes](https://github.com/kriszyp/json-schema/releases) - [Commits](kriszyp/json-schema@v0.3.0...v0.4.0) --- updated-dependencies: - dependency-name: json-schema dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Update CHANGELOG.md * VB -> CS: Continue the correct of several continuable nested blocks - fixes icsharpcode#946 * Dedupe multiple exit/continue variables * VB -> CS: Declare inline variable when referencing anonymously in VB - fixes icsharpcode#949 * At least avoid NRE in icsharpcode#948 Doesn't actually fix orderby and select of group though * Update vb2cs_bug_report.md * Update cs2vb_bug_report.md * Update bug_report.md * Bump loader-utils from 1.4.0 to 1.4.1 in /Web/ClientApp Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md) - [Commits](webpack/loader-utils@v1.4.0...v1.4.1) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Bump minimatch and recursive-readdir in /Web/ClientApp Bumps [minimatch](https://github.com/isaacs/minimatch) and [recursive-readdir](https://github.com/jergason/recursive-readdir). These dependencies needed to be updated together. Updates `minimatch` from 3.0.4 to 3.1.2 - [Release notes](https://github.com/isaacs/minimatch/releases) - [Commits](isaacs/minimatch@v3.0.4...v3.1.2) Updates `recursive-readdir` from 2.2.2 to 2.2.3 - [Release notes](https://github.com/jergason/recursive-readdir/releases) - [Changelog](https://github.com/jergason/recursive-readdir/blob/master/CHANGELOG.md) - [Commits](https://github.com/jergason/recursive-readdir/commits/v2.2.3) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect - dependency-name: recursive-readdir dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Bump System.Data.SqlClient from 4.8.3 to 4.8.5 in /CommandLine/CodeConv Bumps [System.Data.SqlClient](https://github.com/dotnet/corefx) from 4.8.3 to 4.8.5. - [Release notes](https://github.com/dotnet/corefx/releases) - [Commits](https://github.com/dotnet/corefx/commits) --- updated-dependencies: - dependency-name: System.Data.SqlClient dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Bump System.Data.SqlClient in /CommandLine/CodeConv.NetFramework Bumps [System.Data.SqlClient](https://github.com/dotnet/corefx) from 4.8.1 to 4.8.5. - [Release notes](https://github.com/dotnet/corefx/releases) - [Commits](https://github.com/dotnet/corefx/commits) --- updated-dependencies: - dependency-name: System.Data.SqlClient dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Bump System.Data.SqlClient from 4.8.2 to 4.8.5 in /Func Bumps [System.Data.SqlClient](https://github.com/dotnet/corefx) from 4.8.2 to 4.8.5. - [Release notes](https://github.com/dotnet/corefx/releases) - [Commits](https://github.com/dotnet/corefx/commits) --- updated-dependencies: - dependency-name: System.Data.SqlClient dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Bump System.Data.SqlClient from 4.8.1 to 4.8.5 in /Vsix Bumps [System.Data.SqlClient](https://github.com/dotnet/corefx) from 4.8.1 to 4.8.5. - [Release notes](https://github.com/dotnet/corefx/releases) - [Commits](https://github.com/dotnet/corefx/commits) --- updated-dependencies: - dependency-name: System.Data.SqlClient dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Bump System.Data.SqlClient from 4.8.1 to 4.8.5 in /Web Bumps [System.Data.SqlClient](https://github.com/dotnet/corefx) from 4.8.1 to 4.8.5. - [Release notes](https://github.com/dotnet/corefx/releases) - [Commits](https://github.com/dotnet/corefx/commits) --- updated-dependencies: - dependency-name: System.Data.SqlClient dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Bump loader-utils from 1.4.1 to 1.4.2 in /Web/ClientApp Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](webpack/loader-utils@v1.4.1...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Update README.md * Remove global json and see what happens * Temporarily disable these tests until they work with dot net 7 * Wait for build to finish! * Update README.md * Change build order in advance of using this in tests * Don't use InitializeComponent in temp file * Ignore temp files with InitializeComponent * Splits static and instance handlers and include property ones icsharpcode#967 * Recommend VS2022 We'll likely need to drop VS2019 support to dodge the bugs caused by various combinations of the libraries * Update README.md * Try running exe * nuget update all * Use IsKind as required in later versions of codeanalysis * Satisfy new API requirements * Downgrade to 4.2.0 to avoid bugs in 4.3 and 4.4 Note: Needed to upgrade >3.11 to avoid dotnet/msbuild#7873 Needed to downgrade < 4.3 to avoid dotnet/roslyn#63780 * Revert attempt to run command line, even though it'd likely now work * Update expectations (sane indentation) for what the new library does * Ditch global.json again * Try to pick a consistent set of dependencies based on the codeanalysis 4.2.0 * Ensure full error details appear in exception (not just log) * Record version used * Output version when available * Block versions before 17.2 which will fail to load after this PR * 9.1.0 * Undo VS2019 incompatible changes * Update non-user-facing nuget packages * Manually install System.Memory to get assembly version 4.1.2 and workaround dotnet/msbuild#7873 * Update CHANGELOG.md * Update README.md * Multiline strings correctly followed by a newline - fixes icsharpcode#970 * 9.1.1 (9.1.0 was never released) * Update CHANGELOG.md * Update README.md * Remove converter error from icsharpcode#965 (still creates compile error) - closes icsharpcode#965 * Add test for icsharpcode#975 - closes icsharpcode#975 * Add to changelog * Err on the side of caution for array types - fixes icsharpcode#962 * Remove todo that appears to be done * Bump json5 from 1.0.1 to 1.0.2 in /Web/ClientApp Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](json5/json5@v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Handle the case when the event container doesn't exist - relates to icsharpcode#977 icsharpcode#979 * Revert unintended change * 9.1.2 * Sketch of solution for icsharpcode#982 * Add tests to refine details * Rearrange methods && and || are special for not being applicable to nullable objects hence their special handling to get the value * More tests * Changelog * Replace newline with specified character - fixes icsharpcode#973 * Fix test case compilation error - fixes icsharpcode#985 * Test tweaks * 9.1.3 * Remove crash preventer which ironically now causes crashes - fixes icsharpcode#986 * Convert more targets matching common pattern Existing MultiFileSolutionAndProjectTests cover this, the regex is generalised to work for other things like UWP projects icsharpcode#988 * Add ToString when concatenating a string and an object - fixes icsharpcode#974 * Fixup other tests to use ToString * Denied CSC : error CS1617: Invalid option '11.0' for /langversion. Use '/langversion:?' to list supported values. [D:\a\CodeConverter\CodeConverter\CodeConverter\CodeConverter.csproj] Build FAILED. CSC : error CS1617: Invalid option '11.0' for /langversion. Use '/langversion:?' to list supported values. [D:\a\CodeConverter\CodeConverter\CodeConverter\CodeConverter.csproj] 0 Warning(s) 1 Error(s) * Enable arm64 vsix * Bump webpack from 5.65.0 to 5.76.1 in /Web/ClientApp Bumps [webpack](https://github.com/webpack/webpack) from 5.65.0 to 5.76.1. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.65.0...v5.76.1) --- updated-dependencies: - dependency-name: webpack dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * 9.2.0 - first arm64 compatible * CType(Nothing, Date?) now converts to default(DateTime?) - fixes icsharpcode#994 * Conditional indexer now converted - fixes icsharpcode#993 * 9.2.1 * Fix issue icsharpcode#998 * Fix issue icsharpcode#1000 * Update CHANGELOG.md * Fix issue icsharpcode#1003 * Update CHANGELOG.md * Replace self too * Set some fallback logic for picking name * Allow object initializer to be self referential - fixes icsharpcode#1002 * Use different example * Show where the comments end up * Make progress each recursion - fixes icsharpcode#1007 * 9.2.2 * Pass through statements * Move try/catch logic all to the same spot - and reuse method body visitor * Generate a horrible do loop with a switch statement for handlers TODO: * Deal with non-returning code paths * Ensure loops within the method can still break/continue as expected * Handle one very specific case * Handle nulls and remove comment from old plan * Separate method * Neaten up when there's no fall through * Add to changelog * Implement icsharpcode#1008 - could be spruced up with eg code samples, currently only taken the Description -> respective PackageReadme.md * Update actions versions * Specifically use 1.0.6 action that is using node 16 * If written or inherited, a property is generated which will do the hookup upon assignment * Push event assignment to end of constructor - fixes icsharpcode#967 * Passing test - closes icsharpcode#991 * Changelog and test tweak * Prevent source mapping for field initializers hoisted to constructor - fixes icsharpcode#1017 * Refine IsDefinitelyStatic * Somewhat ugly mechanism for detecting when within an expression tree * When converting "Is" and "IsNot" within an expression tree, use "==" - fixes icsharpcode#1015 * Mark WhereClauseSyntax as always boolean in CSharp - fixes icsharpcode#894 * Worked around "CONVERSION ERROR: usingKeyword" bug caused by VS 17.7.0 preview 2 - fixes icsharpcode#1019 Note the added test hasn't been seen to fail since updating the nuget package to the preview caused another issue I'll look into * Don't use patterns when name is reusable - relates to icsharpcode#1011 * Try to precisely cover each case that requires a single execution * Latest langversion * Make it possible to track whether in query * Don't bother trying to deal with nullables within expressions - closes icsharpcode#1011 * Changelog * Update characterization * Dodge null * 9.2.3 * Bump tough-cookie from 4.0.0 to 4.1.3 in /Web/ClientApp Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3. - [Release notes](https://github.com/salesforce/tough-cookie/releases) - [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md) - [Commits](salesforce/tough-cookie@v4.0.0...v4.1.3) --- updated-dependencies: - dependency-name: tough-cookie dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Add Linq.Expressions reference to defaults * Restore original state rather than forcing false * Pay attention to lambda expressions - fixes icsharpcode#930 Inspired by https://github.com/JosefPihrt/Roslynator/blob/7ba2f29f5090aa13f4dd6b7936af55180b678333/src/CSharp/CSharp/Extensions/SyntaxExtensions.cs#L3114 * Don't do VB comparison within expressions - fixes icsharpcode#316 * Maintain expression type in variable declaration * Changelog * Update README.md * Omit ByVal as recommended by IDE0081 - fixes icsharpcode#1024 * Bump word-wrap from 1.2.3 to 1.2.4 in /Web/ClientApp Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * add test for a non-VB-Chr Method * Fix VB.Chr method recognition * remove trailing NewLine in SpecialConversionTests.cs * remove EOL * remove EOL * really fix the EOL at EOF this time I hope * Basic implementation with current library version - fixes 1032 * Use verbatim literals rather than manually escape * Refine logic for using verbatim strings * Update CHANGELOG.md * tests: add tests for clashing renamer and enum types * fix: clashing renamer for enums * chore: update changelog * refactor: use INamedTypeSymbol * tests: regenerate results * Bump @babel/traverse from 7.16.7 to 7.23.2 in /Web/ClientApp Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.16.7 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * BinaryConditional's first expression isn't always boolean - fixes icsharpcode#1038 * Walk existing structure bottom up to avoid stack overflow - fixes icsharpcode#1033 Only worth doing this since it's a really easy way to cause an error that's been seen by multiple real users. Not planning to protect against every possible version of this, since that would add a lot of complexity for a tiny reward * Bump axios from 0.27.2 to 1.6.0 in /Web/ClientApp Bumps [axios](https://github.com/axios/axios) from 0.27.2 to 1.6.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v0.27.2...v1.6.0) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Mention Versions * This couldn't be resolved when running latest version of VS... don't know why * Try to create this as a net standard project since msbuild is complaining about net 48 stuff * Recharacterize in this form * add a workaround It's only required until dotnet/roslyn#71115 is fixed. (cherry picked from commit b0a64e6) * And the sln files * Exit Property now returns value assigned to return variable - fixes icsharpcode#1051 * Remove square brackets when escaping labels and identifiers - fixes icsharpcode#1043, fixes icsharpcode#1044 * Add example * Split test class in two * It's a csharp compile error to use optional parameters before ref parameters - fixes icsharpcode#1057 * `Nothing` is the default, don't bother specifying since we can't get it right for structs - fixes icsharpcode#1056 * Avoid stack overflow in stack overflow prevention code - fixes icsharpcode#1047 * Reformat * Apply to additional declarations - fixes icsharpcode#1053 Note: Also removed other changelog item which was broken and fixed within this release * 9.2.4 * Remove missed issue * Use a wrapper that calls escape identifier * Overescape identifiers - fixes # 1043 Don't worry about exactly which context, just escape in any case * This can obviously have dots in, so is a name, and it turns out we don't need to parse it * Cast to dynamic when the accessed member can't be found but the surrounding object can - fixes icsharpcode#786 There's probably a more specific condition which should trigger this if we look in Roslyn code * Conversion of parenthesized ref arguments no longer assigns back - fixes icsharpcode#1046 * Add Func + Web startup option * Update to dot net 8 and react 18 render method * Set the path in the url needed to debug locally * Add new test and move existing tests together The existing test may need an update to work for icsharpcode#749 and icsharpcode#1062 * Remove part of fix for icsharpcode#749 - fixes icsharpcode#1062 * Some more tests * CHANGELOG * Recharacterize * Convert constant characters directly to constant strings * Select case for a mixture of strings and characters converts correctly - fixes icsharpcode#1061 * Bump follow-redirects from 1.15.3 to 1.15.4 in /Web/ClientApp Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](follow-redirects/follow-redirects@v1.15.3...v1.15.4) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Bump System.Data.SqlClient from 4.8.5 to 4.8.6 in /Web Bumps [System.Data.SqlClient](https://github.com/dotnet/corefx) from 4.8.5 to 4.8.6. - [Release notes](https://github.com/dotnet/corefx/releases) - [Commits](https://github.com/dotnet/corefx/commits) --- updated-dependencies: - dependency-name: System.Data.SqlClient dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Bump System.Data.SqlClient in /CommandLine/CodeConv.NetFramework Bumps [System.Data.SqlClient](https://github.com/dotnet/corefx) from 4.8.5 to 4.8.6. - [Release notes](https://github.com/dotnet/corefx/releases) - [Commits](https://github.com/dotnet/corefx/commits) --- updated-dependencies: - dependency-name: System.Data.SqlClient dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Bump System.Data.SqlClient from 4.8.5 to 4.8.6 in /Func Bumps [System.Data.SqlClient](https://github.com/dotnet/corefx) from 4.8.5 to 4.8.6. - [Release notes](https://github.com/dotnet/corefx/releases) - [Commits](https://github.com/dotnet/corefx/commits) --- updated-dependencies: - dependency-name: System.Data.SqlClient dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Bump System.Data.SqlClient from 4.8.5 to 4.8.6 in /Vsix Bumps [System.Data.SqlClient](https://github.com/dotnet/corefx) from 4.8.5 to 4.8.6. - [Release notes](https://github.com/dotnet/corefx/releases) - [Commits](https://github.com/dotnet/corefx/commits) --- updated-dependencies: - dependency-name: System.Data.SqlClient dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Bump System.Data.SqlClient from 4.8.5 to 4.8.6 in /CommandLine/CodeConv Bumps [System.Data.SqlClient](https://github.com/dotnet/corefx) from 4.8.5 to 4.8.6. - [Release notes](https://github.com/dotnet/corefx/releases) - [Commits](https://github.com/dotnet/corefx/commits) --- updated-dependencies: - dependency-name: System.Data.SqlClient dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Only cast for boxing when it's not implicit - fixes icsharpcode#1071 But since this removes some casts, do still ensure that predefined cast expressions always cast since otherwise casting to T via object gets broken * 9.2.5 * Set TFM to net6.0;net8.0 for "warning NETSDK1138: The target framework 'netcoreapp3.1' is out of support and will not receive security updates in the future." * Upgrade Azure Function to .NET 8 * Update NuGet packages for Tests project (based on File/New xUnit project) * Update CHANGELOG.md * Test for case similar to icsharpcode#782 * Don't try to ref foreach, Me or Using identifiers - fixes icsharpcode#1052 * Catch when it's a different type or the method is missing due to version issues * Cater net 45 and non-compiling solutions --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: GrahamTheCoder <GrahamTheCoder@gmail.com> Co-authored-by: Christoph Wille <christoph.wille@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GrahamTheCoder <graham.helliwell@savanta.com> Co-authored-by: Jeremy Philippe <jeremy.philippe@gmail.com> Co-authored-by: Timur Kelman <tymur.gubayev@gmail.com> Co-authored-by: Timur Kelman <Timur.Kelman@fecher.eu> Co-authored-by: Dominik Baran <dominik.baran@gustline.com> Co-authored-by: Dominik Baran <dominik.baran7@gmail.com>
Using 6.8.0
First a difficult one -- LINQ. Converting a string compare to
is rejected by LINQ and is wrong since the case sensitivity of LINQ is a function of the database, not the VB program. Unfortunately, you don't necessarily know it's a LINQ to SQL expression so it's not clear what is right. Perhaps an option or a flag?
I had an expression
the (0) was not converted to [0] as it should've been. I'll change the source to .First() to avoid this.
RIght now I put the conversion on hold as I try to clean up async-- VB is far more lenient and the legacy code hasn't been fully converted though it works. Not much you can do about that.
The text was updated successfully, but these errors were encountered: