implement reverse execution for gdb

fixes microsoft/vscode-cpptools#2130
See https://github.com/microsoft/vscode-cpptools/issues/2130#issuecomment-680978926

We will want to check if gdb can do reverse commands. You will need to execute -list-target-features and check for reverse.

The problem is we need to advertise the capability before the target is even launched.

There is a CapabilitiesEvent that can be sent if it has changed. We are not sure if VS Code supports changing the UI for reverse if the capabilities have changed.

Drafted something.

Done, it's a lot cleaner now.
I even implemented stepping granularity.

Done.

@Trass3r For the launch scenario, do you have -interpreter-exec console \"target record-full\" in the setup command?

No. Even in gdb itself there are different methods to record and then there's the next level rr tool which is what I use.
You can't hardcode the method.

Do we need to worry that someone would enable reverse execution in the middle of debugging? We only check and enable Reverse functionality in Launch/Attach. Is there a set of commands we can capture to resend the capabilities?

That's a good question, is it possible with the gdb way?
Using rr it's a two stage procedure.

I've never used RR, but its good to know that it works in that scenario.
This is how I was testing with GDB.
-list-target-features
^done,features=[]
(gdb)
-exec-step
^running
*running,thread-id="all"
(gdb)
*stopped,reason="end-stepping-range",frame={addr="0x0000000008001224",func="main",args=[],file="main.cpp",fullname="/home/waan/cpp/main.cpp",line="7",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="0"
(gdb)
-exec-step --reverse
^error,msg="Target native does not support this command."
(gdb)
target record-full
&"target record-full\n"
=record-started,thread-group="i1",method="full"
^done
(gdb)
-list-target-features
^done,features=["reverse"]
(gdb)
-exec-step
^running
*running,thread-id="all"
(gdb)
*stopped,reason="end-stepping-range",frame={addr="0x000000000800139a",func="std::chrono::duration<long, std::ratio<1l, 1000l> >::duration<int, void>",args=[{name="this",value="0x80018bd <__libc_csu_init+77>"},{name="__rep",value="<error reading variable>"}],file="/usr/include/c++/9/chrono",fullname="/usr/include/c++/9/chrono",line="331",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="0"
(gdb)
-exec-step --reverse
^running
*running,thread-id="1"
(gdb)
*stopped,reason="end-stepping-range",frame={addr="0x000000000800122b",func="main",args=[],file="main.cpp",fullname="/home/waan/cpp/main.cpp",line="7",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="0"
(gdb)

We may want a check in HandleEvaluateRequestAsync and if its a -exec with record, check for target-features and update the capabilities.

I see, makes sense.

Do we need to worry that someone would enable reverse execution in the middle of debugging? We only check and enable Reverse functionality in Launch/Attach. Is there a set of commands we can capture to resend the capabilities?

Hello, I'm using also UndoDB which record from the beginning, but with gdb I only record specific portion of code.
So yeah, as a user, that something i'm likely to do.

@Trass3r Ignore my suggestion above about capturing commands for users in HandleEvaluateAsync. We could detect recording when GDB sends the output
=record-started,thread-group="i1",method="full" then update the capabilities

FYI from https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Async-Records.html:
=record-started,thread-group="id",method="method"[,format="format"]
=record-stopped,thread-group="id"

Execution log recording was either started or stopped on an inferior. The id is the GDB identifier of the thread group corresponding to the affected inferior.
The method field indicates the method used to record execution. If the method in use supports multiple recording formats, format will be present and contain the currently used format. See Process Record and Replay, for existing method and format values.

Something like this. The question is how to proceed from there.

Sorry for the delay, again. I am looking on how this should be implemented with the given API.
What needs to be done is:
IDebugReversibleEngineProgram160.CanReverse is going to be controlled by a variable m_canReverse. This can be initially false.
When we first call MICommandFactory.GetTargetFeatures() we can do this check and assign m_canReverse
m_canReverse = DebuggedProcess.TargetFeatures.Contains("reverse");
Anytime we get the record-started/record-stopped events, update m_canReverse.

For updating the Capabilities to the Client, there will need to be a check every time we stop to see if we should send an updated CapabilitiesEvent. This can be before we send off the OpenDebugStoppedEvent.

Ok this sort of works but first of all we get an Unknown stopping event exception when reaching the end of the record history.
Also this only updates the UI one time step later. You enable recording but the caps are only after the next step (which would still be kind of ok cause you couldn't step back at this point anyway), you stop recording and the stepping buttons are still there.
Sidenote: no clue where
 natvis FormatDisplayString: Value cannot be null.
Parameter name: key

comes from. There is no such variable.

Log:
`record full
<--   C (evaluate-14): {"command":"evaluate","arguments":{"expression":"`record full","frameId":1000,"context":"repl"},"type":"request","seq":14}
    <-1039-interpreter-exec console "record full"
    ->=record-started,thread-group="i1",method="full"
    ->1039^done
    ->(gdb)
    1039: elapsed time 2
    <-1040-list-target-features
    ->1040^done,features=["async","reverse"]
    ->(gdb)
    1040: elapsed time 0
    natvis FormatDisplayString: Value cannot be null.
Parameter name: key
--> R (evaluate-14): {"type":"response","request_seq":14,"success":true,"command":"evaluate","body":{"result":"","variablesReference":0},"seq":574}

<--   C (scopes-15): {"command":"scopes","arguments":{"frameId":1000},"type":"request","seq":15}
--> R (scopes-15): {"type":"response","request_seq":15,"success":true,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":1003,"expensive":false}]},"seq":577}
<--   C (variables-16): {"command":"variables","arguments":{"variablesReference":1003},"type":"request","seq":16}
    <-1041-var-create - * "((s)._M_dataplus)._M_p"
    ->1041^done,name="var7",numchild="1",value="0xa <error: Cannot access memory at address 0xa>",type="std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::pointer",thread-id="1",has_more="0"
    ->(gdb)
    1041: elapsed time 1
    <-1042-var-list-children --simple-values "var7" 0 1000
    ->1042^done,numchild="1",children=[child={name="var7.*((s)._M_dataplus)._M_p",exp="*((s)._M_dataplus)._M_p",numchild="0",value="",type="char16_t",thread-id="1"}],has_more="0"
    ->(gdb)
    1042: elapsed time 0
--> R (variables-16): {"type":"response","request_seq":16,"success":true,"command":"variables","body":{"variables":[{"name":"s","value":"0xa <error: Cannot access memory at address 0xa>","type":"std::u16string","evaluateName":"s","variablesReference":1004},{"name":"argc","value":"1","type":"int","evaluateName":"argc","variablesReference":0,"memoryReference":"0x0000000000000001"},{"name":"argv","value":"0x7fffffffdcc8","type":"const char **","evaluateName":"argv","variablesReference":1005,"memoryReference":"0x00007fffffffdcc8"}]},"seq":596}
<--   C (next-17): {"command":"next","arguments":{"threadId":1342},"type":"request","seq":17}
    <-1043-exec-next
    ->1043^running
    ->*running,thread-id="all"
    ->(gdb)
    1043: elapsed time 0
--> R (next-17): {"type":"response","request_seq":17,"success":true,"command":"next","body":{},"seq":609}
    ->*stopped,reason="end-stepping-range",frame={addr="0x00005555555552aa",func="main",args=[{name="argc",value="1"},{name="argv",value="0x7fffffffdcc8"}],file="test.cpp",fullname="/tmp/test.cpp",line="17",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="2"
    <-1044-stack-list-frames 0 1000
    ->1044^done,stack=[frame={level="0",addr="0x00005555555552aa",func="main",file="test.cpp",fullname="/tmp/test.cpp",line="17",arch="i386:x86-64"}]
    ->(gdb)
    1044: elapsed time 0
    <-1045-var-delete var3
    ->1045^done,ndeleted="1"
    ->(gdb)
    1045: elapsed time 0
    <-1046-var-delete var4
    ->1046^done,ndeleted="2"
    ->(gdb)
    1046: elapsed time 0
    <-1047-var-delete var5
    ->1047^done,ndeleted="7"
    ->(gdb)
    1047: elapsed time 0
    <-1048-var-delete var6
    ->1048^done,ndeleted="2"
    ->(gdb)
    1048: elapsed time 0
    <-1049-var-delete var7
    ->1049^done,ndeleted="2"
    ->(gdb)
    1049: elapsed time 0
    Send Event AD7StepCompleteEvent
--> E (capabilities): {"type":"event","event":"capabilities","body":{"capabilities":{"exceptionBreakpointFilters":[],"supportsStepBack":true,"completionTriggerCharacters":[],"additionalModuleColumns":[],"supportedChecksumAlgorithms":[]}},"seq":663}
--> E (stopped): {"type":"event","event":"stopped","body":{"reason":"step","threadId":1342,"allThreadsStopped":true,"source":{"name":"test.cpp","path":"/tmp/test.cpp","sources":[],"checksums":[]},"line":17,"column":1},"seq":665}
<--   C (threads-18): {"command":"threads","type":"request","seq":18}
--> R (threads-18): {"type":"response","request_seq":18,"success":true,"command":"threads","body":{"threads":[{"id":1342,"name":"test"}]},"seq":668}
<--   C (stackTrace-19): {"command":"stackTrace","arguments":{"threadId":1342,"startFrame":0,"levels":20},"type":"request","seq":19}
    <-1050-stack-list-arguments 0 0 0
    ->1050^done,stack-args=[frame={level="0",args=[name="argc",name="argv"]}]
    ->(gdb)
    1050: elapsed time 0
    <-1051-var-create - * "argc"
    ->1051^done,name="var8",numchild="0",value="1",type="int",thread-id="1",has_more="0"
    ->(gdb)
    1051: elapsed time 0
    <-1052-var-delete var8
    ->1052^done,ndeleted="1"
    ->(gdb)
    1052: elapsed time 0
    <-1053-var-create - * "argv"
    ->1053^done,name="var9",numchild="1",value="0x7fffffffdcc8",type="const char **",thread-id="1",has_more="0"
    ->(gdb)
    1053: elapsed time 0
    <-1054-var-delete var9
    ->1054^done,ndeleted="1"
    ->(gdb)
    1054: elapsed time 0
--> R (stackTrace-19): {"type":"response","request_seq":19,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1000,"name":"main(int argc, const char ** argv)","source":{"name":"test.cpp","path":"/tmp/test.cpp","sources":[],"checksums":[]},"line":17,"column":1}],"totalFrames":1},"seq":711}
<--   C (stackTrace-20): {"command":"stackTrace","arguments":{"threadId":1342,"startFrame":0,"levels":20},"type":"request","seq":20}
--> R (stackTrace-20): {"type":"response","request_seq":20,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1001,"name":"main(int argc, const char ** argv)","source":{"name":"test.cpp","path":"/tmp/test.cpp","sources":[],"checksums":[]},"line":17,"column":1}],"totalFrames":1},"seq":714}
<--   C (scopes-21): {"command":"scopes","arguments":{"frameId":1000},"type":"request","seq":21}
    <-1055-stack-list-variables 0
    ->1055^done,variables=[{name="argc",arg="1"},{name="argv",arg="1"},{name="s"}]
    ->(gdb)
    1055: elapsed time 0
    <-1056-var-create - * "argc"
    ->1056^done,name="var10",numchild="0",value="1",type="int",thread-id="1",has_more="0"
    ->(gdb)
    1056: elapsed time 0
    <-1057-var-create - * "argv"
    ->1057^done,name="var11",numchild="1",value="0x7fffffffdcc8",type="const char **",thread-id="1",has_more="0"
    ->(gdb)
    1057: elapsed time 1
    <-1058-var-create - * "s"
    ->1058^done,name="var12",numchild="2",value="{...}",type="std::u16string",thread-id="1",has_more="0"
    ->(gdb)
    1058: elapsed time 0
--> R (scopes-21): {"type":"response","request_seq":21,"success":true,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":1000,"expensive":false}]},"seq":749}
<--   C (variables-22): {"command":"variables","arguments":{"variablesReference":1000},"type":"request","seq":22}
    <-1059-var-list-children --simple-values "var12" 0 1000
    ->1059^done,numchild="2",children=[child={name="var12.public",exp="public",numchild="1",value="",thread-id="1"},child={name="var12.private",exp="private",numchild="3",value="",thread-id="1"}],has_more="0"
    ->(gdb)
    1059: elapsed time 1
    <-1060-var-list-children --simple-values "var12.public" 0 1000
    ->1060^done,numchild="1",children=[child={name="var12.public.npos",exp="npos",numchild="0",value="18446744073709551615",type="const std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::size_type",thread-id="1"}],has_more="0"
    ->(gdb)
    1060: elapsed time 1
    <-1061-var-list-children --simple-values "var12.private" 0 1000
    ->1061^done,numchild="3",children=[child={name="var12.private._M_dataplus",exp="_M_dataplus",numchild="2",type="std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::_Alloc_hider",thread-id="1"},child={name="var12.private._M_string_length",exp="_M_string_length",numchild="0",value="4",type="std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::size_type",thread-id="1"},child={name="var12.private.2_anonymous",exp="<anonymous union>",numchild="1",type="union {...}",thread-id="1"}],has_more="0"
    ->(gdb)
    1061: elapsed time 1
    <-1062-var-create - * "((s)._M_dataplus)._M_p"
    ->1062^done,name="var13",numchild="1",value="0x7fffffffdba0 u\"test\"",type="std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::pointer",thread-id="1",has_more="0"
    ->(gdb)
    1062: elapsed time 1
    <-1063-var-list-children --simple-values "var13" 0 1000
    ->1063^done,numchild="1",children=[child={name="var13.*((s)._M_dataplus)._M_p",exp="*((s)._M_dataplus)._M_p",numchild="0",value="116 u't'",type="char16_t",thread-id="1"}],has_more="0"
    ->(gdb)
    1063: elapsed time 0
    <-1064-var-list-children --simple-values "var11" 0 1000
    ->1064^done,numchild="1",children=[child={name="var11.*argv",exp="*argv",numchild="1",value="0x7fffffffdf65 \"/tmp/test\"",type="const char *",thread-id="1"}],has_more="0"
    ->(gdb)
    1064: elapsed time 0
--> R (variables-22): {"type":"response","request_seq":22,"success":true,"command":"variables","body":{"variables":[{"name":"s","value":"0x7fffffffdba0 u\"test\"","type":"std::u16string","evaluateName":"s","variablesReference":1001},{"name":"argc","value":"1","type":"int","evaluateName":"argc","variablesReference":0,"memoryReference":"0x0000000000000001"},{"name":"argv","value":"0x7fffffffdcc8","type":"const char **","evaluateName":"argv","variablesReference":1002,"memoryReference":"0x00007fffffffdcc8"}]},"seq":800}
<--   C (stepBack-23): {"command":"stepBack","arguments":{"threadId":1342},"type":"request","seq":23}
    <-1065-exec-next --reverse
    ->1065^running
    ->*running,thread-id="1"
    1065: elapsed time 0
    ->(gdb)
--> R (stepBack-23): {"type":"response","request_seq":23,"success":true,"command":"stepBack","body":{},"seq":813}
    ->~"\nNo more reverse-execution history.\n"

No more reverse-execution history.
    ->~"main (argc=1, argv=0x7fffffffdcc8) at test.cpp:16\n"
main (argc=1, argv=0x7fffffffdcc8) at test.cpp:16
    ->~"16\t\tstd::u16string s = u\"test\";\n"
    ->*stopped,frame={addr="0x000055555555527b",func="main",args=[{name="argc",value="1"},{name="argv",value="0x7fffffffdcc8"}],file="test.cpp",fullname="/tmp/test.cpp",line="16",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="2"
16		std::u16string s = u"test";
    <-1066-stack-list-frames 0 1000
    ->1066^done,stack=[frame={level="0",addr="0x000055555555527b",func="main",file="test.cpp",fullname="/tmp/test.cpp",line="16",arch="i386:x86-64"}]
    ->(gdb)
    1066: elapsed time 0
    <-1067-var-delete var10
    ->1067^done,ndeleted="1"
    ->(gdb)
    1067: elapsed time 0
    <-1068-var-delete var11
    ->1068^done,ndeleted="2"
    ->(gdb)
    1068: elapsed time 0
    <-1069-var-delete var12
    ->1069^done,ndeleted="7"
    ->(gdb)
    1069: elapsed time 0
    <-1070-var-delete var13
    ->1070^done,ndeleted="2"
    ->(gdb)
    1070: elapsed time 0
    Send Event AD7ExceptionEvent
--> E (stopped): {"type":"event","event":"stopped","body":{"reason":"exception","threadId":1342,"text":"Unknown stopping event","allThreadsStopped":true,"source":{"name":"test.cpp","path":"/tmp/test.cpp","sources":[],"checksums":[]},"line":16,"column":1},"seq":871}
<--   C (threads-24): {"command":"threads","type":"request","seq":24}
--> R (threads-24): {"type":"response","request_seq":24,"success":true,"command":"threads","body":{"threads":[{"id":1342,"name":"test"}]},"seq":874}
<--   C (stackTrace-25): {"command":"stackTrace","arguments":{"threadId":1342,"startFrame":0,"levels":20},"type":"request","seq":25}
    <-1071-stack-list-arguments 0 0 0
    ->1071^done,stack-args=[frame={level="0",args=[name="argc",name="argv"]}]
    ->(gdb)
    1071: elapsed time 0
    <-1072-var-create - * "argc"
    ->1072^done,name="var14",numchild="0",value="1",type="int",thread-id="1",has_more="0"
    ->(gdb)
    1072: elapsed time 0
    <-1073-var-delete var14
    ->1073^done,ndeleted="1"
    ->(gdb)
    1073: elapsed time 0
    <-1074-var-create - * "argv"
    ->1074^done,name="var15",numchild="1",value="0x7fffffffdcc8",type="const char **",thread-id="1",has_more="0"
    ->(gdb)
    1074: elapsed time 0
    <-1075-var-delete var15
    ->1075^done,ndeleted="1"
    ->(gdb)
    1075: elapsed time 0
--> R (stackTrace-25): {"type":"response","request_seq":25,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1000,"name":"main(int argc, const char ** argv)","source":{"name":"test.cpp","path":"/tmp/test.cpp","sources":[],"checksums":[]},"line":16,"column":1}],"totalFrames":1},"seq":917}
<--   C (stackTrace-26): {"command":"stackTrace","arguments":{"threadId":1342,"startFrame":0,"levels":20},"type":"request","seq":26}
--> R (stackTrace-26): {"type":"response","request_seq":26,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1001,"name":"main(int argc, const char ** argv)","source":{"name":"test.cpp","path":"/tmp/test.cpp","sources":[],"checksums":[]},"line":16,"column":1}],"totalFrames":1},"seq":920}
<--   C (scopes-27): {"command":"scopes","arguments":{"frameId":1000},"type":"request","seq":27}
    <-1076-stack-list-variables 0
    ->1076^done,variables=[{name="argc",arg="1"},{name="argv",arg="1"},{name="s"}]
    ->(gdb)
    1076: elapsed time 2
    <-1077-var-create - * "argc"
    ->1077^done,name="var16",numchild="0",value="1",type="int",thread-id="1",has_more="0"
    ->(gdb)
    1077: elapsed time 2
    <-1078-var-create - * "argv"
    ->1078^done,name="var17",numchild="1",value="0x7fffffffdcc8",type="const char **",thread-id="1",has_more="0"
    ->(gdb)
    1078: elapsed time 1
    <-1079-var-create - * "s"
    ->1079^done,name="var18",numchild="2",value="{...}",type="std::u16string",thread-id="1",has_more="0"
    ->(gdb)
    1079: elapsed time 1
--> R (scopes-27): {"type":"response","request_seq":27,"success":true,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":1000,"expensive":false}]},"seq":955}
<--   C (variables-28): {"command":"variables","arguments":{"variablesReference":1000},"type":"request","seq":28}
    <-1080-var-list-children --simple-values "var18" 0 1000
    ->1080^done,numchild="2",children=[child={name="var18.public",exp="public",numchild="1",value="",thread-id="1"},child={name="var18.private",exp="private",numchild="3",value="",thread-id="1"}],has_more="0"
    ->(gdb)
    1080: elapsed time 0
    <-1081-var-list-children --simple-values "var18.public" 0 1000
    ->1081^done,numchild="1",children=[child={name="var18.public.npos",exp="npos",numchild="0",value="18446744073709551615",type="const std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::size_type",thread-id="1"}],has_more="0"
    ->(gdb)
    1081: elapsed time 0
    <-1082-var-list-children --simple-values "var18.private" 0 1000
    ->1082^done,numchild="3",children=[child={name="var18.private._M_dataplus",exp="_M_dataplus",numchild="2",type="std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::_Alloc_hider",thread-id="1"},child={name="var18.private._M_string_length",exp="_M_string_length",numchild="0",value="93824992239101",type="std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::size_type",thread-id="1"},child={name="var18.private.2_anonymous",exp="<anonymous union>",numchild="1",type="union {...}",thread-id="1"}],has_more="0"
    ->(gdb)
    1082: elapsed time 1
    <-1083-var-create - * "((s)._M_dataplus)._M_p"
    ->1083^done,name="var19",numchild="1",value="0xa <error: Cannot access memory at address 0xa>",type="std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::pointer",thread-id="1",has_more="0"
    ->(gdb)
    1083: elapsed time 4
    <-1084-var-list-children --simple-values "var19" 0 1000
    ->1084^done,numchild="1",children=[child={name="var19.*((s)._M_dataplus)._M_p",exp="*((s)._M_dataplus)._M_p",numchild="0",value="",type="char16_t",thread-id="1"}],has_more="0"
    ->(gdb)
    1084: elapsed time 0
    <-1085-var-list-children --simple-values "var17" 0 1000
    ->1085^done,numchild="1",children=[child={name="var17.*argv",exp="*argv",numchild="1",value="0x7fffffffdf65 \"/tmp/test\"",type="const char *",thread-id="1"}],has_more="0"
    ->(gdb)
    1085: elapsed time 0
--> R (variables-28): {"type":"response","request_seq":28,"success":true,"command":"variables","body":{"variables":[{"name":"s","value":"0xa <error: Cannot access memory at address 0xa>","type":"std::u16string","evaluateName":"s","variablesReference":1001},{"name":"argc","value":"1","type":"int","evaluateName":"argc","variablesReference":0,"memoryReference":"0x0000000000000001"},{"name":"argv","value":"0x7fffffffdcc8","type":"const char **","evaluateName":"argv","variablesReference":1002,"memoryReference":"0x00007fffffffdcc8"}]},"seq":1006}

`record stop
<--   C (evaluate-35): {"command":"evaluate","arguments":{"expression":"`record stop","frameId":1000,"context":"repl"},"type":"request","seq":35}
    <-1107-interpreter-exec console "record stop"
    ->~"Process record is stopped and all execution logs are deleted.\n"
    ->=record-stopped,thread-group="i1"
    ->1107^done
    ->(gdb)
    1107: elapsed time 2
    <-1108-list-target-features
Process record is stopped and all execution logs are deleted.
    natvis FormatDisplayString: Value cannot be null.
Parameter name: key
    ->1108^done,features=["async"]
--> R (evaluate-35): {"type":"response","request_seq":35,"success":true,"command":"evaluate","body":{"result":"","variablesReference":0},"seq":1234}

    ->(gdb)
    1108: elapsed time 1
<--   C (scopes-36): {"command":"scopes","arguments":{"frameId":1000},"type":"request","seq":36}
--> R (scopes-36): {"type":"response","request_seq":36,"success":true,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":1003,"expensive":false}]},"seq":1242}
<--   C (variables-37): {"command":"variables","arguments":{"variablesReference":1003},"type":"request","seq":37}
    <-1109-var-create - * "((s)._M_dataplus)._M_p"
    ->1109^done,name="var26",numchild="1",value="0x7fffffffdba0 u\"test\"",type="std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::pointer",thread-id="1",has_more="0"
    ->(gdb)
    1109: elapsed time 1
    <-1110-var-list-children --simple-values "var26" 0 1000
    ->1110^done,numchild="1",children=[child={name="var26.*((s)._M_dataplus)._M_p",exp="*((s)._M_dataplus)._M_p",numchild="0",value="116 u't'",type="char16_t",thread-id="1"}],has_more="0"
    ->(gdb)
    1110: elapsed time 0
--> R (variables-37): {"type":"response","request_seq":37,"success":true,"command":"variables","body":{"variables":[{"name":"s","value":"0x7fffffffdba0 u\"test\"","type":"std::u16string","evaluateName":"s","variablesReference":1004},{"name":"argc","value":"1","type":"int","evaluateName":"argc","variablesReference":0,"memoryReference":"0x0000000000000001"},{"name":"argv","value":"0x7fffffffdcc8","type":"const char **","evaluateName":"argv","variablesReference":1005,"memoryReference":"0x00007fffffffdcc8"}]},"seq":1261}
<--   C (stepBack-38): {"command":"stepBack","arguments":{"threadId":1342},"type":"request","seq":38}
    <-1111-exec-next --reverse
    ->1111^error,msg="Target native does not support this command."
    ->(gdb)
    1111: elapsed time 1
    Send Event AD7MessageEvent
ERROR: Unexpected GDB output from command "-exec-next --reverse". Target native does not support this command.
--> R (stepBack-38): {"type":"response","request_seq":38,"success":false,"command":"stepBack","message":"Unable to step next. Operation failed with error code 0x80004004.","body":{},"seq":1276}
<--   C (next-39): {"command":"next","arguments":{"threadId":1342},"type":"request","seq":39}
    <-1112-exec-next
    ->1112^running
    ->*running,thread-id="all"
    1112: elapsed time 2
    ->(gdb)
--> R (next-39): {"type":"response","request_seq":39,"success":true,"command":"next","body":{},"seq":1289}
    ->*stopped,reason="end-stepping-range",frame={addr="0x00005555555552c5",func="main",args=[{name="argc",value="1"},{name="argv",value="0x7fffffffdcc8"}],file="test.cpp",fullname="/tmp/test.cpp",line="16",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="6"
    <-1113-stack-list-frames 0 1000
    ->1113^done,stack=[frame={level="0",addr="0x00005555555552c5",func="main",file="test.cpp",fullname="/tmp/test.cpp",line="16",arch="i386:x86-64"}]
    ->(gdb)
    1113: elapsed time 0
    <-1114-var-delete var22
    ->1114^done,ndeleted="1"
    ->(gdb)
    1114: elapsed time 0
    <-1115-var-delete var23
    ->1115^done,ndeleted="2"
    ->(gdb)
    1115: elapsed time 0
    <-1116-var-delete var24
    ->1116^done,ndeleted="7"
    ->(gdb)
    1116: elapsed time 0
    <-1117-var-delete var25
    ->1117^done,ndeleted="2"
    ->(gdb)
    1117: elapsed time 0
    <-1118-var-delete var26
    ->1118^done,ndeleted="2"
    ->(gdb)
    1118: elapsed time 0
    Send Event AD7StepCompleteEvent
--> E (capabilities): {"type":"event","event":"capabilities","body":{"capabilities":{"exceptionBreakpointFilters":[],"supportsStepBack":false,"completionTriggerCharacters":[],"additionalModuleColumns":[],"supportedChecksumAlgorithms":[]}},"seq":1343}
--> E (stopped): {"type":"event","event":"stopped","body":{"reason":"step","threadId":1342,"allThreadsStopped":true,"source":{"name":"test.cpp","path":"/tmp/test.cpp","sources":[],"checksums":[]},"line":16,"column":1},"seq":1345}
<--   C (threads-40): {"command":"threads","type":"request","seq":40}
--> R (threads-40): {"type":"response","request_seq":40,"success":true,"command":"threads","body":{"threads":[{"id":1342,"name":"test"}]},"seq":1348}
<--   C (stackTrace-41): {"command":"stackTrace","arguments":{"threadId":1342,"startFrame":0,"levels":20},"type":"request","seq":41}
    <-1119-stack-list-arguments 0 0 0
    ->1119^done,stack-args=[frame={level="0",args=[name="argc",name="argv"]}]
    ->(gdb)
    1119: elapsed time 1
    <-1120-var-create - * "argc"
    ->1120^done,name="var27",numchild="0",value="1",type="int",thread-id="1",has_more="0"
    ->(gdb)
    1120: elapsed time 0
    <-1121-var-delete var27
    ->1121^done,ndeleted="1"
    ->(gdb)
    1121: elapsed time 0
    <-1122-var-create - * "argv"
    ->1122^done,name="var28",numchild="1",value="0x7fffffffdcc8",type="const char **",thread-id="1",has_more="0"
    ->(gdb)
    1122: elapsed time 0
    <-1123-var-delete var28
    ->1123^done,ndeleted="1"
    ->(gdb)
    1123: elapsed time 0
--> R (stackTrace-41): {"type":"response","request_seq":41,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1000,"name":"main(int argc, const char ** argv)","source":{"name":"test.cpp","path":"/tmp/test.cpp","sources":[],"checksums":[]},"line":16,"column":1}],"totalFrames":1},"seq":1391}
<--   C (stackTrace-42): {"command":"stackTrace","arguments":{"threadId":1342,"startFrame":0,"levels":20},"type":"request","seq":42}
--> R (stackTrace-42): {"type":"response","request_seq":42,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1001,"name":"main(int argc, const char ** argv)","source":{"name":"test.cpp","path":"/tmp/test.cpp","sources":[],"checksums":[]},"line":16,"column":1}],"totalFrames":1},"seq":1394}
<--   C (scopes-43): {"command":"scopes","arguments":{"frameId":1000},"type":"request","seq":43}
    <-1124-stack-list-variables 0
    ->1124^done,variables=[{name="argc",arg="1"},{name="argv",arg="1"},{name="s"}]
    ->(gdb)
    1124: elapsed time 2
    <-1125-var-create - * "argc"
    ->1125^done,name="var29",numchild="0",value="1",type="int",thread-id="1",has_more="0"
    ->(gdb)
    1125: elapsed time 1
    <-1126-var-create - * "argv"
    ->1126^done,name="var30",numchild="1",value="0x7fffffffdcc8",type="const char **",thread-id="1",has_more="0"
    ->(gdb)
    1126: elapsed time 0
    <-1127-var-create - * "s"
    ->1127^done,name="var31",numchild="2",value="{...}",type="std::u16string",thread-id="1",has_more="0"
    ->(gdb)
    1127: elapsed time 0
--> R (scopes-43): {"type":"response","request_seq":43,"success":true,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":1000,"expensive":false}]},"seq":1429}
<--   C (variables-44): {"command":"variables","arguments":{"variablesReference":1000},"type":"request","seq":44}
    <-1128-var-list-children --simple-values "var31" 0 1000
    ->1128^done,numchild="2",children=[child={name="var31.public",exp="public",numchild="1",value="",thread-id="1"},child={name="var31.private",exp="private",numchild="3",value="",thread-id="1"}],has_more="0"
    ->(gdb)
    1128: elapsed time 1
    <-1129-var-list-children --simple-values "var31.public" 0 1000
    ->1129^done,numchild="1",children=[child={name="var31.public.npos",exp="npos",numchild="0",value="18446744073709551615",type="const std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::size_type",thread-id="1"}],has_more="0"
    ->(gdb)
    1129: elapsed time 1
    <-1130-var-list-children --simple-values "var31.private" 0 1000
    ->1130^done,numchild="3",children=[child={name="var31.private._M_dataplus",exp="_M_dataplus",numchild="2",type="std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::_Alloc_hider",thread-id="1"},child={name="var31.private._M_string_length",exp="_M_string_length",numchild="0",value="4",type="std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::size_type",thread-id="1"},child={name="var31.private.2_anonymous",exp="<anonymous union>",numchild="1",type="union {...}",thread-id="1"}],has_more="0"
    ->(gdb)
    1130: elapsed time 1
    <-1131-var-create - * "((s)._M_dataplus)._M_p"
    ->1131^done,name="var32",numchild="1",value="0x7fffffffdba0 u\"test\"",type="std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::pointer",thread-id="1",has_more="0"
    ->(gdb)
    1131: elapsed time 1
    <-1132-var-list-children --simple-values "var32" 0 1000
    ->1132^done,numchild="1",children=[child={name="var32.*((s)._M_dataplus)._M_p",exp="*((s)._M_dataplus)._M_p",numchild="0",value="116 u't'",type="char16_t",thread-id="1"}],has_more="0"
    ->(gdb)
    1132: elapsed time 0
    <-1133-var-list-children --simple-values "var30" 0 1000
    ->1133^done,numchild="1",children=[child={name="var30.*argv",exp="*argv",numchild="1",value="0x7fffffffdf65 \"/tmp/test\"",type="const char *",thread-id="1"}],has_more="0"
    ->(gdb)
    1133: elapsed time 1
--> R (variables-44): {"type":"response","request_seq":44,"success":true,"command":"variables","body":{"variables":[{"name":"s","value":"0x7fffffffdba0 u\"test\"","type":"std::u16string","evaluateName":"s","variablesReference":1001},{"name":"argc","value":"1","type":"int","evaluateName":"argc","variablesReference":0,"memoryReference":"0x0000000000000001"},{"name":"argv","value":"0x7fffffffdcc8","type":"const char **","evaluateName":"argv","variablesReference":1002,"memoryReference":"0x00007fffffffdcc8"}]},"seq":1480}

It's also interesting that when trying to step back again after record stop (see above) the error is merely shown in the debug console and in the UI it seems like nothing happened while exceptions are shown right in the editor, also error messages aren't propagated consistently:
<--   C (stepBack-38): {"command":"stepBack","arguments":{"threadId":1519},"type":"request","seq":38}
    <-1111-exec-next --reverse
    ->1111^error,msg="Target native does not support this command."
    ->(gdb)
    1111: elapsed time 0
    Send Event AD7MessageEvent
ERROR: Unexpected GDB output from command "-exec-next --reverse". Target native does not support this command.
--> R (stepBack-38): {"type":"response","request_seq":38,"success":false,"command":"stepBack","message":"Unable to step next. Operation failed with error code 0x80004004.","body":{},"seq":1276}

That error message comes from:
https://github.com/microsoft/MIEngine/blob/7bde94d47101873c5649377b4cdacacd4d9aef70/src/MIDebugEngine/Natvis.Impl/Natvis.cs#L362
Something might have went wrong in the natvis you are referencing?

in the UI it seems like nothing happened while exceptions are shown right in the editor, also error messages aren't propagated consistently:

I don't VS code expects reverse stepping to fail if the capabilities are right.
Let me give this another thought to have it correctly set when we disable record.

Something might have went wrong in the natvis you are referencing?

Ah ok I guess _M_p is null then:
  <Type Name="std::u16string">
    <DisplayString>{_M_dataplus._M_p}</DisplayString>
  </Type>

@Trass3r Sorry, I did some cleanup in the project so there are conflicts. We are removing any references to ClrDbg since that is a legacy engine now.
Also to solve the UI issue, you will want to check to see if the reverse state has changed in an evaluate request if it is an isExecInConsole, and if it has changed, send a CapabilitiesEvent.
https://github.com/microsoft/MIEngine/blob/73db59d89b8f0fbfdaa3cee1423e674e092ffc0f/src/OpenDebugAD7/AD7DebugSession.cs#L2033

Also to solve the UI issue, you will want to check to see if the reverse state has changed in an evaluate request if it is an isExecInConsole, and if it has changed, send a CapabilitiesEvent.

I wouldn't do that. First of all the user could also use the MI version of the command even if it's less likely.
Secondly there may very well be other ways to trigger this, .gdbinit comes to mind as an example (but that should already be covered by the launch check).
Is there no way to notify OpenDebug? That would be the clean solution.

We do not have an existing event for handling this case.

I wouldn't do that. First of all the user could also use the MI version of the command even if it's less likely

Then I think it would be always have a check such as:
bool canReverse = ((IDebugReversibleEngineProgram160)m_engine).CanReverse() == HRConstants.S_OK;
if (m_canReverseDebug != canReverse)
{
   m_canReverseDebug = canReverse;
   SendEvent(new CapabilitiesEvent() {
      SupportsReverseDebugging = true
   }
}

where IDebugReversibleEngineProgram160.CanReverse is
int IDebugReversibleEngineProgram160.CanReverse() {
   return m_canReverse ? S_OK : S_FALSE;
}

This check isn't expensive, but it is more of a poll based system than an event driven one.

Then I think it would be always have a check such as:
bool canReverse = ((IDebugReversibleEngineProgram160)m_engine).CanReverse() == HRConstants.S_OK;
if (m_canReverseDebug != canReverse)
{
   m_canReverseDebug = canReverse;
   SendEvent(new CapabilitiesEvent() {
      SupportsReverseDebugging = true
   }
}

That's what I have.
https://github.com/microsoft/MIEngine/commit/3d220f7b2351b835012e6822a625b0d7f559c9e8#diff-af838dac0d9374c0d4b17ae4dabf4c46R657-R672

Something might have went wrong in the natvis you are referencing?

No it's actually an impl bug, it tries to evaluate the command as a variable:
1: (7984) Natvis.FindType {"Name":"`record","Value":"","TypeName":null,"IsParameter":false,"Children":null,"Client":{"Id":1},"Error":false,"CountChildren":0,"IsChild":false,"Access":0,"IsVisualized":false,"PropertyInfoFlags":0,"IsPreformatted":false,"IsStringType":false,"ThreadContext":{"pc":93824992236155,"sp":0,"Function":"main","TextPosition":{"FileName":"\\tmp\\test.cpp","BeginPosition":{"dwLine":15,"dwColumn":0},"EndPosition":{"dwLine":15,"dwColumn":0}},"From":"","Level":0},"VariableNodeType":0}
1: (7984) ->(gdb)
1: (7984) 1040: elapsed time 1
1: (7985) natvis FormatDisplayString: Value cannot be null.
Parameter name: key

ping

In the -exec target record-full scenario, stepping forwards a few times and then backwards.
I'm running into these lines.
https://github.com/microsoft/MIEngine/blob/728f403c563c2c50c46542e9b44271a7f8d5895b/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs#L1286-L1290

Same here.

In the -exec target record-full scenario, stepping forwards a few times and then backwards.
I'm running into these lines.
https://github.com/microsoft/MIEngine/blob/728f403c563c2c50c46542e9b44271a7f8d5895b/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs#L1286-L1290

Same here.
Didn't this come up in another PR as well?

So the problem is that gdb only outputs No more reverse-execution history instead of giving a reason in the stopped event, not sure how to handle this properly:
1: (62155) <-1057-exec-next --reverse
1: (62156) ->1057^running
1: (62156) ->*running,thread-id="1"
1: (62156) ->(gdb)
1: (62163) ->~"\nNo more reverse-execution history.\n"
1: (62164) ->~"main (argc=1, argv=0x7fffffffdb78) at ../test.cpp:25\n"
1: (62164) ->~"25\t\tstd::u16string s = u\"test\";\n"
1: (62164) ->*stopped,frame={addr="0x000055555555734b",func="main",args=[{name="argc",value="1"},{name="argv",value="0x7fffffffdb78"}],file="../test.cpp",fullname="/tmp/test.cpp",line="25",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="2"
1: (62164) <-1058-stack-list-frames 0 1000
1: (62165) ->1058^done,stack=[frame={level="0",addr="0x000055555555734b",func="main",file="../test.cpp",fullname="/tmp/test.cpp",line="25",arch="i386:x86-64"}]
...
1: (62175) Send Event AD7ExceptionEvent

                if (breakRequest == BreakRequest.None)
                    _callback.OnStopComplete(thread);

prevents the exception but may "break" other cases ofc and also results in bad UX, you click the buttons multiple times and nothing happens.
But anyway that callback.OnException msg is displayed in a bad way.
"Exception occurred" makes you think of an exception in your program, not in the debug adapter.

@WardenGnaw any feedback?

@WardenGnaw I split off the step granularity and added TODOs and FIXMEs for the remaining issues.
Should be in good shape now.
Oh and that CapabilitiesEvent is still not in the DAP dll it seems.

@Trass3r microsoft.visualstudio.shared.vscodedebugprotocol v16.9.50204.1 should have the CapabilitiesEvent.
This will be upgraded when feature/dotnet gets merged in.

@WardenGnaw true, it's there now. But the problem remains that it seemingly initializes the Capabilities List properties like ExceptionBreakpointFilters, so they get included in the json message even though we don't want to override them, see my FIXME.
Same problem affects InitializeResponse which should actually reuse the new Capabilities  type I guess.

@gregg-miskelly Could you also approve the workflow here? I don't know why it suddenly asks for this again for every PR.

            Protocol.SendEvent(new InitializedEvent());

You want to call UpdateCapabilities here instead of after LaunchSuspended.

Refers to: src/OpenDebugAD7/AD7DebugSession.cs:3516 in d84213d. [](commit_id = d84213d23462da942a1d5093d9973f2d1133b08e, deletion_comment = False)

@gregg-miskelly Could you also approve the workflow here? I don't know why it suddenly asks for this again for every PR.

It looks like someone did this for you already right? Or did I miss something?

@gregg-miskelly Could you also approve the workflow here? I don't know why it suddenly asks for this again for every PR.

It looks like someone did this for you already right? Or did I miss something?

Sorry, that was me. I had a moment during my break to poke the "Approve button". I just approved it again.

@Trass3r I see that your PR still has some TODO comments. Would you consider this ready for a full review? Or are you still working on it.?

Btw, for testing:
int main()
{
	int i = 0;
	++i;
	++i;
	return i;
}

$ gdb --batch -ex 'b main' -ex r -ex n -ex 'p i' -ex 'record full' -ex n -ex 'p i' -ex n -ex 'p i' -ex n -ex 'p i' -ex 'reverse-next' -ex 'p i' -ex 'reverse-next' -ex 'p i' -ex 'reverse-next' -ex 'p i' test

3           int i = 0;
completed.
+p i
$1 = 17
+record full
+target record-full
+n
4           ++i;
completed.
+p i
$2 = 0
+n
5           ++i;
completed.
+p i
$3 = 1
+n
6               return i;
completed.
+p i
$4 = 2
+reverse-next
+next
5           ++i;
completed.
+p i
$5 = 1
+reverse-next
+next
4           ++i;
completed.
+p i
$6 = 0
+reverse-next
+next

No more reverse-execution history.
main () at /tmp/test.cpp:3
3           int i = 0;
completed.
+p i
$7 = 17

Any ideas for improving the UX when reaching the boundaries of the recorded data:
https://github.com/microsoft/MIEngine/pull/1037/files#diff-e6a6b2741c810dcffe4bf13d4c697e2a326b9aa13752825ee0544977797273b0R1409-R1416

Any ideas for improving the UX when reaching the boundaries of the recorded data:

First, I would suggest trying a quick hack where you patch up the properties in OpenDebugStoppedEvent to see what it will take to make VS Code display something good -- do we just need to fix the Description? The Description and then Reason? etc.
If you can get that to a place you want, then it will give me a better idea in the MIEngine side.

Created a gdb ticket for the missing reason: https://sourceware.org/bugzilla/show_bug.cgi?id=29260

@gregg-miskelly but I guess that issue can be captured in a ticket and fixed separately.

@gregg-miskelly but I guess that issue can be captured in a ticket and fixed separately?!

I also created a gdb ticket for the missing reason: https://sourceware.org/bugzilla/show_bug.cgi?id=29260

Finally fixed.
https://github.com/bminor/binutils-gdb/commit/37f54063ed0daaffbd52f69efbdb4c8e0a9c9cca


name idea(s)

You asked on twitter, but I don't use it nor mastodon, so I let myself answer here: my name idea is: "lute"! :)
Otherwise, please try to not go with TypedLua/TypeLua; this would be too similar to the previous project of this name in my eyes...
Good luck! :)

How about "Teal" as in tl and the color. Just a thought

"tl;dr" :stuck_out_tongue:
More seriously, though, I can't find many words that would fit with the .tl extension. Teal, Tail, Tale, Tool...
I can think of some other words, but they would require changing the extension a bit (like "Tulip" => .tlp).

I kind of like tl (pronounced tee-ell) actually. It's short, simple, easy to read, and easy to write.

Let's go with Teal then!
It seems to be the most-liked name (based on likes here and my ultra-scientific Twitter poll), plus it allows us to keep both the filename extension and the compiler name, it's pronounced mostly the same, and gives us a beautiful mascot. :)

I don't know how you made it, but the circle logo with a square in it now totally looks to me like a head and eye of a duck "teal" indeed, just missing a beak! I wonder if this is only the power of suggestion, or is there something more behind it?... o_O

I wonder if this is only the power of suggestion, or is there something more behind it?

@akavel hahaha, it wasn't the goal but I could see that working! :smile:

All right, let's close this one then!


float16/half support for CUDA

CUDA has support for the half/float16 type, but currently the Slang language doesn't support it. At the moment half actually becomes float in CUDA output. This might seem a little odd, but HLSL has a precedent of this behavior, with sm6_2 bringing actual support.
In order to get half support in CUDA is typically achieved by  #include "cuda_fp16.h" from the CUDA SDK. This introduces a variety of intrinsics as well as the __half and __half2 types. It may be possible/desirable to not include cuda_fp16.h and just copy the appropriate definitions into the cuda-prelude.h. If they are defined in prelude - this would preclude them being included with "cuda_fp16.h" unless this is somehow guarded.
The introduced types are essentially opaque - it is not possible to directly operate on them, there are intrinsics to do that. Moreover there are yet other intrinsics that perform operations on __half2 types.
An initial implementation might not want to deal with supporting half maths, but being able to convert between half types and other types that arithmetic can be performed on. In such an implementation it would be useful if it supported the HLSL vector type for half (if not any operations on it). It does open a question on how vector<half,3> would be implemented...
struct half3_1 { __half2 xy; __half2 z_; }
struct half3_2{ __half2 xy; __half z; }
struct half3_3{ __half x, y, z; }

half3_3 has the potential for tightest packing, but loses the performance advantages of being able to do half2 ops in parallel. If implemented halfX with __half2 type it would require different behavior, as it would require different intrinsics, based on X.
Once this decision is made it is necessary to have support for doing the conversions. The HLSL intrinsics are
uint16_t asuint16(float16_t value);
vector<uint16_t,N> asuint16<let N : int>(vector<float16_t,N> value);
matrix<uint16_t,R,C> asuint16<let R : int, let C : int>(matrix<float16_t,R,C> value);

float16_t asfloat16(uint16_t value);
vector<float16_t,N> asfloat16<let N : int>(vector<uint16_t,N> value);
matrix<float16_t,R,C> asfloat16<let R : int, let C : int>(matrix<uint16_t,R,C> value);

// signed

int16_t asint16(float16_t value);
vector<int16_t,N> asint16<let N : int>(vector<float16_t,N> value);
matrix<int16_t,R,C> asint16<let R : int, let C : int>(matrix<float16_t,R,C> value);

float16_t asfloat16(int16_t value);
vector<float16_t,N> asfloat16<let N : int>(vector<int16_t,N> value);
matrix<float16_t,R,C> asfloat16<let R : int, let C : int>(matrix<int16_t,R,C> value);

It is assumed that the matrix impl on CUDA will just be on top of the vector implementation - so it's layout is dependent on the choice of vector described above.
Implementing the scalar versions of these conversions should be straightforward.
Implementing for vector/matrix is more complicated if we want to take advantage of __half2.
Do we support conversions of interger types to half (say uint and int)?
CUDA intrinsics have controls for rounding - presumably we just worry about the rounding of the HLSL intrinsics.
For maths support - it will require CUDA specific intrinsics for specializations for vectors based on width.

Preliminary half support for CUDA is merged.


Enable MacOS in e2e bastion test

What's new:

Enabled MacOS in e2e bastion test

Codecov Report

Merging #541 (6cef033) into main (501eba9) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #541   +/-   ##
=======================================
  Coverage   30.55%   30.55%
=======================================
  Files          64       64
  Lines        8228     8228
=======================================
  Hits         2514     2514
  Misses       5470     5470
  Partials      244      244

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


ARROW-3707: [C++] Fix test regression with zstd 1.3.7

Upstream issue: https://github.com/facebook/zstd/issues/1385

The Windows compilation failure is in the static CRT build. The only thing that changed is bumping the zstd version.
libzstd_static.lib(threading.obj) : error LNK2019: unresolved external symbol __imp__beginthreadex referenced in function ZSTD_pthread_create

@MaxRis can you advise here?

@pitrou probably, there is some zstd patching related issue (like linkage to static crt was not configured properly). Need to check more deeply

I think I unbroke the Windows builds now.
@MaxRis If you are interested in zstd, it seems it's not possible to do a debug build using the cmake files anymore: https://github.com/facebook/zstd/pull/1278

Now, Static_Crt_Build job is green. Can we remove it from allow_failures?

This also needs a rebase to remove the RAT failure.

Codecov Report

Merging #2909 into master will increase coverage by 12.97%.
The diff coverage is 65%.

@@             Coverage Diff             @@
##           master    #2909       +/-   ##
===========================================
+ Coverage   74.37%   87.35%   +12.97%
===========================================
  Files          68      416      +348
  Lines        5160    64943    +59783
===========================================
+ Hits         3838    56734    +52896
- Misses       1228     8115     +6887
  Partials       94       94

Impacted Files
Coverage Δ

cpp/src/arrow/util/compression_zstd.cc
91.75% <65%> (ø)

python/pyarrow/ipc.pxi
68.36% <0%> (ø)

cpp/src/parquet/column_page.h
89.28% <0%> (ø)

cpp/src/parquet/bloom_filter-test.cc
99.15% <0%> (ø)

cpp/src/plasma/client.cc
84.54% <0%> (ø)

cpp/src/arrow/io/test-common.h
97.29% <0%> (ø)

cpp/src/arrow/ipc/metadata-internal.h
100% <0%> (ø)

cpp/src/arrow/python/io.cc
94.91% <0%> (ø)

python/pyarrow/hdfs.py
36.84% <0%> (ø)

cpp/src/parquet/column_scanner.cc
60.86% <0%> (ø)

... and 339 more

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 c303cc9...9fb0676. Read the comment docs.


Broken links

Customer Case Studies links are broken

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 6f91f89b-5196-0ea5-28fc-79cf59ab327e
Version Independent ID: 0f4f2d0d-0913-8b47-15ab-7300dc2aa1a3
Content: Overview and Usage Scenarios - SQL Server
Content Source: docs/relational-databases/in-memory-oltp/overview-and-usage-scenarios.md
Product: sql
Technology: in-memory-oltp
GitHub Login: @Kevin-Farlee
Microsoft Alias: kfarlee

@aauronn -- Luis, thank you for catching this.  I am updating this article.


Use codecov.io

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@ea1cc90). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #86   +/-   ##
=========================================
  Coverage          ?   79.74%
=========================================
  Files             ?       23
  Lines             ?     1264
  Branches          ?        0
=========================================
  Hits              ?     1008
  Misses            ?      256
  Partials          ?        0

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 ea1cc90...b66cf12. Read the comment docs.


Multiple URLs not generating coverage

When I use multiple URLs in the URLs array, only the last one run generates a coverage report. Ideally,  it would be consolidated across all the URLs

The issue is here:
https://github.com/CrocInc/grunt-croc-qunit/blob/master/tasks/istanbul.js#L77
I don't know enough about istanbul's coverage.json to write the code to safely merge an existing coverage.json with the new information, or I'd submit a PR


Interactive Tutorial - Scaling Your App

In Step-2: Load Balancing, It is not very convenient to run the curl command multiple times to see the output. It would be much better to ask the learner to create a shell script like below to run the curl request say for 10 times.
Preview of the bash script -
for i in 1 2 3 4 5 6 7 8 9 10
do
        curl $(minikube ip):$NODE_PORT
done

Add /close


Multiverse improvements

This PR:

Improves Multiverse::gc() by keeping all states with a chain length close to the current longest chain (as determined by the SUFFIX_TO_KEEP constant), as well as states at exponentially increasing gaps from the longest chain. This ensures that reconstructing an arbitrary state should be O(n) where n is the block's distance from the current longest chain.

Adds a method Multiverse::get_from_storage() that gets the chain state at block k from memory if present, and otherwise reconstructs it by reading blocks from storage and applying them to the nearest ancestor state that we do have.

Adds a test for Multiverse.

I didn't quite review everything, I think we need to discuss the design decision to make sure we are aware on how it works. overall it looks good and that it will fits, but I'm not sure about explicit GC roots instead of just relying of oldness (except maybe for old fork being populated while gc happens ?)


No built-in solution to dynamically loading app locales messages ?

Is your feature request related to a problem? Please describe.
Me case - Application's got certain amount of locales. So we've ended up having a lot of files with messages translations and importing a lot of <lang>LocaleData from react-inlt in i18n.js. In the end - 1/3 part of the app's main bundle consists of locales messages that probably won't be used by used.
Describe the solution you'd like
Having a built-in solution for kind of lazy loading translations and having only 1 default translation loaded initially.
Describe alternatives you've considered
N/A
Additional context
No additional context

Was receiving Facebook message in French but it’s fixed now thank you
Sent from my iPhone

On Oct 28, 2020, at 6:53 AM, den-logo<EMAIL_ADDRESS>wrote:

Is your feature request related to a problem? Please describe.
Me case - Application's got certain amount of locales. So we've ended up having a lot of files with messages translations and importing a lot of LocaleData from react-inlt in i18n.js. In the end - 1/3 part of the app's main bundle consists of locales messages that probably won't be used by used.
Describe the solution you'd like
Having a built-in solution for kind of lazy loading translations and having only 1 default translation loaded initially.
Describe alternatives you've considered
N/A
Additional context
No additional context
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.


Auto-subscribe to room when invited

Currently when you invite the rocketchat hubot to a room, he will not respond to any commands; I am assuming this is because he doesn't have a meteor subscription. In slack, if you invite hubot to a room, he automatically is available to chat with, you do not need to modify the configuration file to add those rooms.

I agree.  I believe there is a collection we can subscribe to that contains all channels the user is in.

This would be very useful.

:+1:

The default configuration, as updated in the README, supports this now.
Closing ticket.


BreakQuest: Extra Evolution [PCSE00225]

Game summary

Game name: BreakQuest: Extra Evolution
Game serial: PCSE00225

Vita3K summary

Version: v0.1
Build number: 295-930b9fd
Commit hash: https://github.com/vita3k/vita3k/commit/930b9fd

Test environment summary

Tested by: HorrorTroll
OS: Windows 8.1
CPU: Intel Core i5-4200H
GPU: Nvidia Geforce GTX 950M
RAM: 6 GB DDR3

Issues
Crash after open app0:/bqee-cfg.lcfg
Screenshots
Not for moment
Log
vita3k.log

Vita3K summary

Build number: 1026
Commit hash: https://github.com/vita3k/vita3k/commit/ece68df

Issues
Spams Initialized texture with unsupported texture format: 0x87000000 and OpenGL error: 0x502 (GL_INVALID_OPERATION)
Screenshots
None at the moment
Log
vita3k.log

Vita3K v0.1.5 2579-2791bc3e
stuck on the loading screen
vita3k.log

Vita3K Summary

Version: v0.1.6
Build Number: 2995
Commit Hash: https://github.com/Vita3K/Vita3K/commit/81eb58b24028463eb818dc93c76d7af1f914622e
CPU Backend: Dynamic
GPU Backend: Vulkan

Game Summary

Game Name: BreakQuest: Extra Evolution
Game Serial: PCSE00225

Issues
After the loading screen, it immediately tells me that the save data is corrupted. Clicking both Yes or No doesn't blink the New Game.
Screenshots

Logs
vita3k.log

Game is fully playable with at least one DLC installed.
vita3k.log
Please change the tag to Playable.


Error: Git must be installed and in your PATH!

I tried to install Linuxbrew and I got the error from this issue's title. I didn't have Ruby, but the installer took care of it:
[x80486@uplink ~]$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
[sudo] password for x80486:
==> Installing Ruby to /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 26.9M  100 26.9M    0     0  2624k      0  0:00:10  0:00:10 --:--:-- 2612k
==> Installing successful
...
HEAD is now at 117c24f4b Merge pull request #5756 from MikeMcQuaid/update-untap
Error: Git must be installed and in your PATH!
Failed during: /home/linuxbrew/.linuxbrew/bin/brew update --force

I think the same should happens for git since it's a dependency, or am I missing something?

It's meant to use curl as a fallback if you don't have git available.
Try running…
/home/linuxbrew/.linuxbrew/bin/brew install git
brew update

or if that fails…
HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install git
brew update

@x80486 @sjackman I met the same issue when I tried to follow the guide here: https://docs.brew.sh/Homebrew-on-Linux#install.
* [new tag]         2.1.5      -> 2.1.5
 * [new tag]         2.1.6      -> 2.1.6
 * [new tag]         2.1.7      -> 2.1.7
 * [new tag]         2.1.8      -> 2.1.8
 * [new tag]         2.1.9      -> 2.1.9
HEAD is now at e6cfb4a Merge pull request #6629 from timsly/manpage-artifact
==> Downloading https://linuxbrew.bintray.com/bottles-portable-ruby/portable-ruby-2.6.3.x86_64_linux.bottle.tar.gz
Already downloaded: /home/hqfang/.cache/Homebrew/portable-ruby-2.6.3.x86_64_linux.bottle.tar.gz
==> Pouring portable-ruby-2.6.3.x86_64_linux.bottle.tar.gz
Error: Git is unavailable
Error: Failure while executing; `/home/hqfang/.linuxbrew/bin/brew tap homebrew/core` exited with 1.
Error: Git must be installed and in your PATH!
Failed during: /home/hqfang/.linuxbrew/bin/brew update --force

As I can see, I have already have git installed, but it still complain about git, why that happened?
$ which git
/usr/local/git/bin/git

And I also tried to use brew doctor and brew install git, it doesn't help. Could you show me some hints on how to make it work on linux?
Thanks in advance

The suggested commands above failed for me:
$ HOMEBREW_NO_AUTO_UPDATE=1 brew install git
Error: Git is unavailable
Error: Failure while executing; `/home/hqfang/.linuxbrew/bin/brew tap homebrew/core` exited with 1.

Try…
HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_ENV_FILTERING=1 brew install git

I was having the same problem now, and the suggestion worked:
HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_ENV_FILTERING=1 brew install git

Thanks!


Cow: Blacklist urbanclap.ae

Cow requests the blacklist of the website urbanclap\.ae. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

urbanclap\.ae has been seen in 5 true positives, 0 false positives, and 0 NAAs.

Approved by VLAZ in Charcoal HQ


Inline taxonomy helpers gem

This inlines the relevant classes from the https://github.com/alphagov/govuk_taxonomy_helpers gem.
The taxonomy gem was part of an effort to avoid duplication between applications dealing with the taxonomy. Unfortunately we ran out of time last quarter, which left us with an API that was still in flux
(alphagov/govuk_taxonomy_helpers#11).
To avoid confusion, I think it's best to inline the code in the places where we use the taxonomy helpers. We're going to be doing work around the taxonomy in the next couple of months and I think it will be easier to extract code than trying to nail the API right now.
Trello: https://trello.com/c/FVfbiKxn

@whoojemaflip I'm not sure if it would add much. The copied code is used in ExpandedTaxonomy, which has a lot of tests:
https://github.com/alphagov/content-tagger/blob/master/spec/models/taxonomy/expanded_taxonomy_spec.rb
Some of it is also covered in the integration tests:
https://github.com/alphagov/content-tagger/blob/master/spec/features/viewing_taxons_spec.rb
I could copy over https://github.com/alphagov/govuk_taxonomy_helpers/tree/master/spec, but I think it may not add much value right now. I suspect we'll end up doing the things copied here differently anyway in the coming months. What do you think?

I'm not familiar with the plan for the taxonomy helpers gem, but it strikes me that any iteration of the API will likely happen inline with application code. In this case, it will benefit our future selves to have the tests alongside the code to aid refactoring.

On second thought, let's leave the taxonomy gem where it is. I wanted to inline it to make sure that there wasn't any confusion about the status (it shouldn't be used). But I don't think it's worth it to drag in 500 lines of questionable specs into this project. And perhaps the inlining will be confusing too.
As part of https://trello.com/c/rNpmwHt8 we'll probably need to change the UI of this app, which will give us a opportunity to rewrite the taxonomy tree-management code (in gem or not).


Remove last vestiges of travis

I think we can safely enable make tls-tests in circle?

We'll need to figure out what env vars are required - I can tackle that once this lands?


Customisable GAS fee

Is it possible to increase the GAS of transactions so they go through faster? Rather than reducing the waiting time...

Share your strategy man @MichielvLu :smile:

Hahah well even in the current strategy you often end up worse off because the amount of late betters. But you cannot do it later or it will fail. Increasing gas would solve this, but I'm getting errors because I'm not familiar with the packages

betBear(epoch, {
        value: parseEther(GLOBAL_CONFIG.AMOUNT_TO_BET),
      })


Improve NodeBundle ergonomics

Objective

NodeBundles  are useful when working with complex UIs but they are very verbose, especially when you just want to use them as a wrapper element since the defaults don't work well for those cases. There's also a lot of repetitions like style: Style and color: Color.

Solution

Add a few impls on NodeBundle to improve ergonomics. This was highly inspired by the recent changes to TextBundle

NodeBundle::new: most use of NodeBundle is done with a Style and a Color we should make this simpler to do.
NodeBundle::container: It's often useful to be able to wrap multiple element under a single node. To do that you always need a node with a transparent color and a focus policy that let's interaction go through it. The default values don't do that in this case so the best way to fix that in a non-breaking way is to have a new constructor.
Self::with_style and Self::with_color: This is mostly useful when you spawn a transparent node and you want to cchange a flex property on the style. the with_color is not as useful but I don't think there's any downsides in including it.

Changelog

Add a few impls on NodeBundle

NodeBundle::new(Style, Color), NodeBundle::container(), NodeBundle::with_style() and NodeBundle::with_color()

The main reason I only used with_style and with_color is that, honestly, nobody should even be touching the other components 99% of the time. They are pretty much just implementation details at this point. Maybe the focus_policy could be added, but I don't think specifying a custom transforrm on a node should be encouraged. Also, just to be clear, I did this to copy how the TextBundle is currently handled where only a few components have a few with_*

The main reason I only used with_style and with_color is that, honestly, nobody should even be touching the other components 99% of the time. They are pretty much just implementation details at this point. Maybe the focus_policy could be added, but I don't think specifying a custom transforrms on a node should be encouraged. Also, just to be clear, I did this to copy how the TextBundle is currently handled where only a few components have a with_*

Ah, that makes sense. If this is how TextBundle does it, then I'm ok merging this as is. (Although it looks like both of those are going to be replaced with a generic bundle builder pattern soon.)

I renamed new to styled and added a with_focus_policy for the rare cases where you would want a styled node with pass-through.

bors try

There's also a lot of repetitions like style: Style and color: Color.

with_style(Style {}) not only still repeats in the same way as style: Style {}, it does it with more characters and more rust syntax.

[builder pattern]

First, the impl Default for Foo / Foo { bar: Bar, ..default()} pattern is currently the official way to define and use Bundles. A few exceptions exist, but I'm of the mind that these should be reined in. Pattern consistency is important.
I don't think we should go down the "bundle builder" road without more careful consideration. It complicates things for a number of reasons:

It complicates bundles conceptually: makes them more than just a flat list of fields to be set. For a given bundle, creates the question "do I use a builder pattern here"? What method should I call? Setting a field with a builder is no longer necessarily setting a field, as it could do arbitrary logic. Calling NodeBundle::container().with_style(Style {})
Doesn't translate to scene editors: scene editors won't give you a constructor choice. You will say "give this entity this bundle" and then you will set those fields using bevy reflect / ui that ties into it. Of course, what role bundles will play in scenes is TBD, but in the event we don't use bundles for this use case, we will almost certainly adapt code based workflows to use the new concept too. Maintaining NodeBundle and NodePrefab / making people switch between them contextually is probably a bad idea.
More boilerplate for implementors: bundles using this pattern now need to implement builder methods for every component. Failing to do so puts limits on the construction abstraction, which imo is a non-starter. It needs to be all or nothing. Of course UX comes first and I'm happy to eat internal boilerplate in the interest of that.  Should we be encouraging builder patterns in user defined Bundles? Open question, but one we should discuss.
Inconsistency might burn us: consistent pattern in bundles makes abstractions easier to build. Assuming Default is "the" way for bundles to be defined means that we (or the ecosystem) could build some future "entity construction DSL" in the interest of ergonomics. If we've fully embraced the builder pattern for some cases, those might not be compatible. Of course this PR doesn't remove the Default impl, so it wouldn't necessarily break things. But small things like the implicit with_color(c: impl Into<Color>) means that code written with builders wouldn't translate.

Of course, UI ergonomics and UX are a hot / high priority topic. Builders might be the solution. But given that nobody else has pushed back / tried to have this conversation, I'm going to force it :)
Some alternatives to consider (please try to come up with more):

A generically useful "entity construction DSL macro". Obviously macros should be avoided as a matter of policy, but it could be opt-in, doesn't require the builder pattern / extra declaration boilerplate, builds on the existing pattern, and could yield significant wins (beyond what we're winning here). This could either be paired with (2) or support constructors (maybe parameterless only?).
Different Bundles for each variant. ex: ContainerNodeBundle with their own Default impls. (see rationale for avoiding multiple constructors above). Of course, this involves more declaration boilerplate / redundancy than might be acceptable. But builders introduce lots of boilerplate and redundancy too!
Embrace the builder pattern (maybe everywhere), but auto-generate the boilerplate with derives.

Note that some of these ideas are not mutually exclusive / could be adopted in combination. I also have no strong opinions yet, other than that this is a conversation worth having.

This was highly inspired by the recent changes to TextBundle

These thoughts apply to that PR as well / I would have left them there if I had been able to review it.

I have to admit, I was a bit too focused on working around the current status quo than actually make a more deliberate change for the better.
 It's also flawed because I believe the defaults are just not good for a container.
Here's a few changes and new bundles I believe would help alleviate the need for specialized constructor.

Yeet NodeBundle in favor of all the other bundles or keep a NodeBundle with only the bare minimum.
ContainerBundle:

No color component
FocusPolicy::Pass
Only layout options, no images

PanelBundle:

Default to a solid color, I believe this default color should be a color that contrast with the default font color
FocusPolicy::Block
Optional Background image
This one is pretty similar to the current NodeBundle

ImageBundle:

I'm not sure how the color component interacts with images in this case, but default to Color::NONE or Color::WHITE
For now, should just be the same as PanelBundle, I'd like it if it was possible to not add children to an image but it's not something that bevy_ecs supports.
Add an alt-text component for accessibility reasons

BunttonBundle:

Should either have a Text component or be renamed to InteractiveNode

TextBundle:

We need a system to globally configure default values for TextStyle. I believe my FontRef PR is part of the solution, but we need something for the default color and size too.
I also think it should be possible to do TextBundle::from_str("hello bevy"). Declaring text is way too verbose right now.

These bundles having smart defaults will certainly help a bit, but it still has various issues that also needs to be addressed at some point. Using ...default() is fine, but all these bundles always need to use it because user shouldn't be touching all the Transform and visibility stuff, but it still needs to exist on the entity. This contributes a lot to the "verticalness" of ui code but I currently don't know how to fix this. Wrapping these with utility functions would be nice, but the lack of variadics or default parameter makes it really painful.
I believe there are also some issues with introducing even more bundles that contain almost the same things. It will become easier and easier to forget to remove or add a component to each of these bundles whenever we start needing even more components on those bundles. For example, some people are thinking about splitting Style in multiple components. One solution to that problem could be some sort of derive that lets you do something like this, which feels a bit like inheritance, but from a users perspective it would still be flat and they could use the same mechanism for their own complex bundle.
#[flat_bundle(NodeBundle)]
struct ImageBundle {
    image: Image,
    alt_text: String
}

Another small note, using parent in with_children forces rustfmt to add a new line. Using a single letter variable like p removes that new line and honestly feels nicer to read since it makes it easier to ignore but that's a lot more controversial and doesn't need any change in bevy.
A few more future possibilities that would make UI code simpler to build:

Make sure every thing ui related can be defined as an asset file and use a text format that's terser than rust to define those templates. Unfortunately, this isn't nearly enough because you generally want some form of scripting when declaring interactive UI.
A solution to that problem would be the ability to declare an asset file inside a rust macro. This would let you create templates of smaller reusable components directly in the code. At this point we pretty much got react in bevy. You can use rust for any behaviour and just use that macro for declaring small trees of ui nodes.
If we go that route, it would be really nice if that macro could somehow be tied to the hot reload feature of the asset server and be able to be reloaded when the rust file is saved without recompiling everything if only the content of the string changed. This is either very complicated or impossible, but I think it's worth investigating.
As for a DSL macro, I wanted to go that route, but I assumed it was a complete no-go even if it was optional. Since you at least talked about it it makes me interested to at least try to create a third party macro to experiment with that.

This got a bit out of scope of the original PR, but as I said at the start, I was admittedly too focused on improving a very limited subset of the overall problem. I have a bunch more issues that makes abstracting bundle construction in user code hard, but this is too out of scope.

Of course, UI ergonomics and UX are a hot / high priority topic. Builders might be the solution. But given that nobody else has pushed back / tried to have this conversation, I'm going to force it :)
@cart

The feedback is extremely valuable and the push-back is valid, so thank you :)

I have to admit, I was a bit too focused on working around the current status quo than actually make a more deliberate change for the better.
@IceSentry

I got to admit I'm guilty of the same. @IceSentry, your ideas of improving the bundle situation is good I think, and we should extract them into an issue for later.
I do believe that in order to verify the approach and confirm if this is indeed the best approach we need to step back and get a better understanding of our high level targets and where we want to end up.
I've opened the discussion #5604 for this reason and I would love both of your input there.

I think I'm going to close this out until we come to a consensus on direction. Not trying to shut down the conversation, just trying to filter attention. Feel free to respond here if you want this reopened.


Cloth models not importing

Cloth objects are not imported, could be an issue since they're YFT's but still...

https://i.imgur.com/ngUi0VP.gif & https://imgur.com/a/rQAiZul

Cloth yfts are not supported atm and they won't be supported at the initial yft release.


Introduce FileCollectionExecutionTimeValue

FileCollectionExectutionTimeValue encapsulates a way, how particular FileCollection instance going to be encoded/decoded in CC. Conceptually, it's very similar to what Provider has.
Having FileCollectionExectutionTimeValue unlocks two things:

Clean FileCollectionCodec from FileCollection's instance checks.
Allow each FileCollection instance to have optimizations for encoding process

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build


Improve CI scripts

There are now some issues in the CI scripts that we need to address:

Some URLs are hard-coded and are used in more than 1 script.
There are similar/duplicated scripts on other repos that are trying to do the same.

From @jodh-intel in #34:
_Well, we now have 3 scripts that all hard-code the download URL. I'd still argue that install_cc_env_ubuntu.sh doesn't need to know that URL since it's querying for latest anyway.
Then, to avoid the last bit of duplication install_clear_image.sh and install_clear_kernel.sh could both source a script/config file for that URL. I know the URL is unlikely to change, but that isn't the point here.
https://github.com/01org/cc-oci-runtime/tree/master/.ci/ gets all this right and has been in use for a long time. But we now have these scripts plus the bunch in https://github.com/clearcontainers/runtime/tree/master/.ci all doing it slightly differently. It's getting rather confusing. Is the plan to migrate all the scripts from the runtime to the tests repo?_

Absolutely! we should migrate all testing scripts/code that are common to all repos to the tests repo. For instance testing the runtime should look like:

I assume the CI system will already have a checkout of the runtime PR. Compile and install the runtime
Run the runtime static checks and unit tests, grab coverage profile.
git clone git@github.com:clearcontainers/tests.git
install pause bundle, proxy and shim from scripts in the tests/ repo. This can either be from master branches or from special branches indicated by tags in the PR message (that features should be added later, not in the first version)
Run the functional tests. This includes grabbing coverage profiles for each run (or better, merging profiles with the unit-tests one after each test)
Run the docker integration tests
Run he CRI-O integration tests
Run he k8s tests
Publish aggregated coverage numbers (unit-tests + functional tests) in coveralls (See https://github.com/clearcontainers/runtime/issues/191)
Publish the HTML coverage on github pages

These are not set in stone just a guideline for discussion. Not everything has to exist in version one either.
So, scripts that setup the environment and install the components should live in tests/. More generally, anything that is used by at least two repos should be in tests. Each repo will probably have a "master script" sequencing the first few operations, but it should be possible to share everything else (from step 5.).
There's a corresponding bug in the runtime at least https://github.com/clearcontainers/runtime/issues/178.


spectrumscale fixing Paging variable type

Fixing the paging variable type to Pages instead of string

This change is

Coverage remained the same at 58.816% when pulling 5e85f230f569746a16235aee2781d54e455759bc on spectrumscale_pagingissue into 3835cb84683fbcedf343b37b0d61673fce796773 on dev.


Add optional retry for data upload operations

They have a tendency to get interrupted, and an optional retry mechanism would really improve the experience.
This will require care, since if the upload has any opened files, they either have to be re-opened or else the retry aborted.

Another option would be to introduce a multi-step process to upload files one at a time, with retries, and then finally commit them all at once.


Upload limit reached

When I am preparing to submit the results of the LUMIR task and upload the results, a prompt appears saying "Upload limit reached" when it reaches 80%. Is there any solution to this issue?

Hi,
Please review these two posts:

Discussion on upload limits despite multiple submissions allowed per day

Submission Q&A

Based on these, it appears you might be encountering the second issue listed. To resolve this, you have a couple of options: You can register as a verified user, or try submitting your data in 16-bit precision by using the numpy operation  .astype(np.float16).
Junyu

Thank you for your information. I've initiated the account verification process, although it may take some time. Additionally, nii files do not inherently support float-16.

I see. It looks like getting a verified account is the only option. Thank you for bringing this to my attention.
Junyu


Webpack warning crypto

./node_modules/jeep-sqlite/dist/esm/jeep-sqlite.entry.js:2926:20-37 - Warning: Module not found: Error: Can't resolve 'crypto' in '/Volumes/Externo/Field/orc-3/node_modules/jeep-sqlite/dist/esm'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }

As a temporary solution you can use this library https://www.npmjs.com/package/patch-package

Add the 'postinstall' script in your package.json file ["postinstall": "patch-package"]
Install the<EMAIL_ADDRESS>npx patch-package jeep-sqlite
Commit the patches/jeep-sqlite+2.5.4.patch to your repo

Now every time you'll run npm i, the jeep-sqlite will be replaces with version 2.5.4

@caiorsantanna @wk-mihai  the way to handle this is in your project

with Vite: Put resolve.fallback: { crypto: false } in vite.config.ts or vite.config.js.
with Webpack: Put resolve.fallback: { crypto: false } in webpack.config.js.

@caiorsantanna @wk-mihai i close the issue feel free to re-open it if requires


[TypeError: global.setBoolMMKV is not a function]

Describe the bug
clearStore is throwing error [TypeError: global.setBoolMMKV is not a function].
Platform Information:

OS: [ iOS/Android]
React Native Version [ 0.64]
Library Version [e.g. 0.6.0]

Additional context
Add any other context about the problem here.

Describe the bug
clearStore is throwing error [TypeError: global.setBoolMMKV is not a function].
Platform Information:

OS: [ iOS/Android]
React Native Version [ 0.64]
Library Version [e.g. 0.6.0]

Additional context
Add any other context about the problem here.

Check #134


Release 2.0

Hello,
I'm thinking about releasing 2.0 very soon. Does anything miss, does anything needs more work before releasing?
Please comment :)

Released as of https://github.com/nelmio/NelmioSecurityBundle/tree/2.0.0


What is difference?

// Component
struct CShooter
{
    u64 shoot_delay = 0;
    i32 index = 0;
};

// System
void s_shoot(registry& ecs, u64 ns)
{
    auto view = ecs.view<CShooter>();

    for (auto [entity, shooter] : view.each())
    {
        if (shooter.shoot_delay >= ns)
            shooter.shoot_delay -= ns;
        else
            shooter.shoot_delay = 0;

        if (shooter.shoot_delay == 0)
        {
            cout << "BOOM " << shooter.index << endl;
            shooter.shoot_delay = SDL_NS_PER_SECOND * 3 / 2;
        }
    }
}

// Init
void ecs_start(registry& ecs)
{
    entity ent = ecs.create();
    CShooter& ent_shooter = ecs.emplace<CShooter>(ent);
    ent_shooter.shoot_delay = SDL_NS_PER_SECOND * 3;
    ent_shooter.index = 1;

#if 1
    ent = ecs.create();
    ent_shooter = ecs.emplace<CShooter>(ent);
    ent_shooter.shoot_delay = SDL_NS_PER_SECOND * 2;
    ent_shooter.index = 2;
#else
    entity ent2 = ecs.create();
    CShooter& ent2_shooter = ecs.emplace<CShooter>(ent2);
    ent2_shooter.shoot_delay = SDL_NS_PER_SECOND * 2;
    ent2_shooter.index = 2;
#endif
}

With:
    entity ent2 = ecs.create();
    CShooter& ent2_shooter = ecs.emplace<CShooter>(ent2);
    ent2_shooter.shoot_delay = SDL_NS_PER_SECOND * 2;
    ent2_shooter.index = 2;

With:
    ent = ecs.create();
    ent_shooter = ecs.emplace<CShooter>(ent);
    ent_shooter.shoot_delay = SDL_NS_PER_SECOND * 2;
    ent_shooter.index = 2;

emplace returns same address for other ent:

This is how C++ works. It doesn't depend on EnTT. In you second example you have this:
ent_shooter = ecs.emplace<CShooter>(ent);

Where ent_shooter is defined as CShooter& ent2_shooter = ....
This is clearly an error on your side. I hope you can see it now. 👍

ent_shooter stores a reference, after the second call ecs.emplace<CShooter>(ent); it should store a reference to another object.

Okay, I get it.

Okay, I get it.


CI badges show failing when another branch failed.

@lontivero Could you create new branches with the traditional upstream-origin GitHub way? Right now you are working inside my repository, since you have a commit access. No worry about the existing branches, just keep in mind for new ones, ok?

ack

@lontivero You don't need to reject the failing PR-s, the PR-s are not a problem, the failing branches I believe.
But as I said, don't worry about it now, it's rather to be a future policy, and don't remove your current branches here for the shake of administration, keep working on them, but when you would create a new branch in the future, create it under your name and use this as an upstream.


Deploy a CAP Business Service to SAP Business Technology Platform

Tutorials: https://developers.sap.com/tutorials/cap-service-deploy.html
Hi team,
thanks for this nice tutorial. I would like to share the following two points with you...

You may want to think about using the command cds add cf-manifest in order to ease cf manifest based deployment.
This allows you to deploy all apps (my-bookshop-db-deployer and my-bookshop-srv) as well as service creation with a single cf push command - see Deploy Using Manifest Files for further details.

A hint might make sense that users have to check the cf deployment logs in order to see whether HANA database deployment was successful or not. The problem is that cf deployment is successful while HANA deployment might have failed.
cf logs my-bookshop-db-deployer --recent

Kind regards,
Lothar

Hi @LotharBender,
Thank you for the feedback. Together with @renejeglinsky we will have a look at your points and update the tutorial.
Best regards,
Iwona

@MichaelCzcz please keep this open until we have updated the tutorial, thanks :)

Hi @LotharBender,
We will update the tutorial based on the steps described here using MTA. This is tested and also confirmed by René. So I will close this issue. I let you know once we have updated the tutorial.
Best regards,
Iwona


Custom theme

Hi Dylan, great work by the way!
How can I create my own them like if I want to use these colors? https://i.redd.it/f18rt5umt5111.png
Mainly for dwm and st.

I made a couple of .json files and a script to change them and for a reference i took ~/.cache/wal/colors.json. If you need me to, I can send you an example or even the script.


Does Ktorm protect from SQL injections?

I was looking through the documentation of Ktorm and couldn't find any reference to the topic of SQL Injections. Does using Ktorm guarantee protection against SQL injections, or not?
Does it use prepared statements under the hood?
Reading through this article https://www.baeldung.com/sql-injection i noticed that ORM:s in general in fact does not necessarily protect us from SQL injections:
"This is a common misconception. JPA and other ORMs relieves us from creating hand-coded SQL statements, but they won't prevent us from writing vulnerable code"

Yes, of course.

Every ORM framework supports prepared statements.


Fix condition related to disabled TCP stack

Coverage decreased (-0.05%) to 61.499% when pulling 2de75742e353261c1e008e1d81d408033ada9275 on milanlenco:master into 20c58c327d411e5cf1e5e4bea8b60de9af2c2616 on contiv:master.


New Hosts Repo: Illegal Mod Sites

There's a Github repository/website that is keeping track of which websites are distributing illegal/malware-infested mods for various games. Can you add that the list to the unified hosts?
Hosts file
Github repository where everything is updated

Thank you for this suggestion Aaron @a2937.
Using ghosts to assess (see below).
This would add 1,052 domains with no overlap, which is interesting.
$ ghosts -c https://api.stopmodreposts.org/hosts.txt

----------------------------------------
Base hosts file summary:
----------------------------------------
Location: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
Domains: 132,576
Bytes: 4.6 MB
----------------------------------------
Compared hosts file summary:
----------------------------------------
Location: https://api.stopmodreposts.org/hosts.txt
Domains: 1,052
Bytes: 30 kB
Intersection: 0 domains

Certain sites redistributing mods are known to contain malware. There are 58 websites listed just for the Minecraft one.
Link to Evidence

As this repo's mission was to protect against malware, I believed it would be ideal to add it to the unified lists.

You see though Aaron @a2937, that's not what the repo's readme says.
You may be right that a secondary concern of that repo is malware related to Minecraft, and that's good and fine.
But we're not in the business of carrying domains that distribute unauthorized mods related to Minecraft. I don't want to add 1,500 domains trusting that a few are generally concordant with our aims.
I'm really into hot sources that are very closely aligned with what we want to do. We really can't be policing communities.
THAT SAID you know you can fork out Hosts repo and extend it for your specific use case? You can then offer that to the Minecraft community, and staying synchronized with future evolution here is easy. The licensing of this repo permits you to create and maintain derivative works, and that's all-good!

Closing.


Unable to build release

Hi.. i got problem when generating release apk.. the error say:
android/app/build/intermediates/res/merged/release/drawable-mdpi/node_modules_reactnativetimelinelistview_node_modules_reactnativeelements_src_rating_images_heart.png: error: Invalid filename.

I just delete node_modules inside the library then everything going fine.


Update the "Credits" page

The first "Credits" page is brief.  It should contain:

Link to the used images
Link to CherryPy
Link to the bootstrap themes
Link to Jbake (?) as inspiration source

Done


add avro doc field of a record

add avro doc field of a record using model's docstring

@timvancann You merged the branch where sharonyogev worked on to support pydantic v2 and force pushed.
Is that a mistake? Or is there some other intent?
If you were thinking of merging together, please review this pr. 🙇

@sookyomkim  I expect I made a booboo somewhere. Removing the pydantic-v2 changes was not intended. These changes are back so feel free to rebase on main. After that we can approve and merge this one :)

Take a look at this pydantic code.
pydantic takes the docstring of the child class or the docstring of the parent class (if the child class has no docstring), calls cleandoc() to remove the white space, and writes it as a description.
This looks no different than the code I wrote. Except for the part about getting the docstring of the parent class.
Shouldn't that be enough? Do we need to worry about the format of the docstring? Isn't it enough to see it as text and just put it in?
Initially, I implemented it by using pydantic description, but the reason for using a direct docstring is that pydantic description takes the docstring of the parent class if the child class does not have a docstring.
So, if you don't write a docstring in your model, it will take the docstring from AvroBase. This is it.
pydantic v2 doesn't have this problem.

Perhaps a good balance would be taking only the first section of a docstring, as the convention of what they should look like is fairly well defined: https://peps.python.org/pep-0257/#handling-docstring-indentation
class Complex(AvroBase):
    """Form a complex number
    and do other stuff too.

    Keyword arguments:
    real -- the real part (default 0.0)
    imag -- the imaginary part (default 0.0)
    """

doc = Complex.model_json_schema()['description']
split = doc.find('\n\n')
doc = doc[:split] if split != -1 else doc

doc == 'Form a complex number\nand do other stuff too.'

I hadn't seen this PR until after I made mine, and originally closed it.
But, because it also adds the reverse Avro --> Pydantic as well, I've taken some ideas from here and re-opened it.


[swift-stdlib-tool] Add error for missing directories

In the case the user passes a directory that doesn't exist, this now
errors immediately instead of silently ignoring it.

@swift-ci please smoke test

@swift-ci please smoke test macOS Platform


The login & error correction logic

Hi @songtianyi,
Please use this main.go to replace the one in my https://github.com/suntong/wx-go/tree/master/cmd/wx-go and see what you get.
I was trying to straight-out the login/re-login logic and work flow of wechat-go, and this is what i get when I tried to send "3824":
2017/12/20 19:31:32 [I] AcAIgEEJcA==
QRCode here
2017/12/20 19:32:01 [W] login response, window.code=408;
2017/12/20 19:32:01 [E] session exit, login response, window.code=408;
2017/12/20 19:32:30 [W] login response, window.code=201;
2017/12/20 19:32:45 [I] &{28490913...
login successful on second attempt
...
2017/12/20 19:35:27 [I] webpush.web.wechat.com 0 2
2017/12/20 19:35:28 [W] no handlers for key [51]
2017/12/20 19:35:58 [I] webpush.web.wechat.com 0 0
2017/12/20 19:35:58 [E] Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bin/synccheck?_=1513816528000&deviceid=e219888375988845&r=1513816528000&sid=Blz45ePCcGpesIXo&skey=%40crypt_73c0b781_d641e4f28e65c0a46ca2be960effa5e3&synckey=1_667596270%7C2_667600694%7C3_667600570%7C11_667600646%7C13_667390534%7C201_1513816527%7C203_1513808070%7C1000_1513816443%7C1001_1513815314&uin=2849091348: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
2017/12/20 19:36:28 [I] webpush.web.wechat.com 0 0
2017/12/20 19:36:28 [E] Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bin/synccheck?_=1513816558000&deviceid=e219888375988845&r=1513816558000&sid=Blz45ePCcGpesIXo&skey=%40crypt_73c0b781_d641e4f28e65c0a46ca2be960effa5e3&synckey=1_667596270%7C2_667600694%7C3_667600570%7C11_667600646%7C13_667390534%7C201_1513816527%7C203_1513808070%7C1000_1513816443%7C1001_1513815314&uin=2849091348: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

The above error shows up right after I sent "3824", and they are the error I've been experiencing when it didn't work for me on my first try.
I don't think changing the external login logic should affect my plugin's internal behavior. So I need your help to figure out why it work and why it didn't. -- As I suspected in https://github.com/songtianyi/wechat-go/issues/34, I've always been scanning-in on the second attempt. I.e., after I saw the time out error in my console. whereas you must have been always scan-in right away. Could such minor difference make such huge impact?
Anyway, apparently the above main.go is not working for me. Could you see if you can make it work (for both first & second attempt) please?
Thanks

Further on to the error correction logic, I reverted to my old main.go, and scanned in right away, and make my plugin working for me:
2017/12/20 19:38:42 [I] QYDQdzCioA==
QRCode here
2017/12/20 19:38:49 [W] login response, window.code=201;
2017/12/20 19:38:57 [I] &{2...
login successful on first attempt
...
2017/12/20 19:39:01 [I] entering synccheck loop
2017/12/20 19:39:02 [I] webpush.web.wechat.com 0 2
2017/12/20 19:39:03 [W] no handlers for key [51]
2017/12/20 19:39:03 [W] no handlers for key [51]
2017/12/20 19:39:09 [I] webpush.web.wechat.com 0 2
2017/12/20 19:39:10 [I] command '3824' received
2017/12/20 19:39:10 [I] game generated:
 3 5
 8 6
-!!
:8 / (5 - 3) * 6

...
2017/12/20 19:39:11 [I] wechat message sent
2017/12/20 19:39:11 [I] gamer24 exit gracefully
2017/12/20 19:39:11 [I] webpush.web.wechat.com 0 2
2017/12/20 19:39:36 [I] webpush.web.wechat.com 0 2
2017/12/20 19:39:37 [I] command '3824' received
2017/12/20 19:39:37 [I] game generated:
 9 8
 9 1
-XX
...

...
2017/12/20 20:11:10 [I] webpush.web.wechat.com 0 0
2017/12/20 20:11:40 [I] webpush.web.wechat.com 0 0
2017/12/20 20:11:40 [E] Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bin/synccheck?_=1513818670000&deviceid=e046698787456799&r=1513818670000&sid=zQZ88lAbDwKjxapB&skey=%40crypt_73c0b781_a68543a0c0a6d2f8d44e21e05ea20a4d&synckey=1_667596270%7C2_667600722%7C3_667600570%7C11_667600646%7C13_667390534%7C201_1513818591%7C203_1513808070%7C1000_1513816620%7C1001_1513816754&uin=2849091348: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
2017/12/20 20:12:10 [I] webpush.web.wechat.com 0 0
2017/12/20 20:12:10 [E] Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bin/synccheck?_=1513818700000&deviceid=e046698787456799&r=1513818700000&sid=zQZ88lAbDwKjxapB&skey=%40crypt_73c0b781_a68543a0c0a6d2f8d44e21e05ea20a4d&synckey=1_667596270%7C2_667600722%7C3_667600570%7C11_667600646%7C13_667390534%7C201_1513818591%7C203_1513808070%7C1000_1513816620%7C1001_1513816754&uin=2849091348: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

I.e., after letting the session running for ~30 minutes, I suddenly receiving the Timeout exceeded errors messages now. After that, the error will show up non-stop, until I killed it ~20 minutes later:
2017/12/20 20:28:40 [I] webpush.web.wechat.com 0 0
2017/12/20 20:28:40 [E] Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bin/synccheck?_=1513819690000&deviceid=e046698787456799&r=1513819690000&sid=zQZ88lAbDwKjxapB&skey=%40crypt_73c0b781_a68543a0c0a6d2f8d44e21e05ea20a4d&synckey=1_667596270%7C2_667600722%7C3_667600570%7C11_667600646%7C13_667390534%7C201_1513818591%7C203_1513808070%7C1000_1513816620%7C1001_1513816754&uin=2849091348: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
2017/12/20 20:29:10 [I] webpush.web.wechat.com 0 0
2017/12/20 20:29:10 [E] Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bin/synccheck?_=1513819720000&deviceid=e046698787456799&r=1513819720000&sid=zQZ88lAbDwKjxapB&skey=%40crypt_73c0b781_a68543a0c0a6d2f8d44e21e05ea20a4d&synckey=1_667596270%7C2_667600722%7C3_667600570%7C11_667600646%7C13_667390534%7C201_1513818591%7C203_1513808070%7C1000_1513816620%7C1001_1513816754&uin=2849091348: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
^C

After I received the error for the fist time, sending "3824" never works again, despite it has been working before in the same session.
This is another proof from a different angle showing that there is something wrong with the error recovery logic.
Please help. Thx.

Better yet,
please wrap up the first loop as internal loop so that session.LoginAndServe(false) will block and not return until logged in.

the session can go hours not days

And the network may not stable.
You can add my wechat id wxsongtianyi for quick response :)

If by "network not stable" you meant the wechat server then I totally agree -- I had a unreliable network in China so I cannot tell, but here at home, I have fiber Internet, and the only thing I found unreliable is wechat server, not anything else. Moreover, trying from the hosting farms that have 99.9999% reliable rating gives me the exact same conclusion as well.
BTW, please elaborate what you mean by "the session can go hours not days". Thx.

I didn't test the stability of wechat-go, as i know few hours later, the session will broken.

Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bi..
I have meet this error before, but rarely.

OK, when you have some time, please try out the two versions I gave/listed in my OP, and tell me how they work for you, how long can you have the session last, whether scanning-in on the first/second attempt make any differences to you, etc. Thx.


Bug in SawyerNutDisassembleEnvV2 obj_low is greater than obj_high

Hi,
the class SawyerNutDisassembleEnvV2 gets a small bug and thus cannot be initialized correctly.
The obj_low is greater than obj_high in x-axis.
See line 15 and line 16 in:
https://github.com/Farama-Foundation/Metaworld/blob/master/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_disassemble_peg_v2.py

Fixed with most recent commit!