[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-09 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. In D70883#1771686 , @aadsm wrote: > Fair enough, I haven't seen evidence of this (haven't searched for it) but I > imagine IDEs need to ignore this as well otherwise they just barf if they're > expecting `Content-Length` and a

[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-06 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D70883#1771686 , @aadsm wrote: > Fair enough, I haven't seen evidence of this (haven't searched for it) but I > imagine IDEs need to ignore this as well otherwise they just barf if they're > expecting `Content-Length` and a

[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-05 Thread António Afonso via Phabricator via lldb-commits
aadsm abandoned this revision. aadsm added a comment. Fair enough, I haven't seen evidence of this (haven't searched for it) but I imagine IDEs need to ignore this as well otherwise they just barf if they're expecting `Content-Length` and a wild print appears. The notion of stdout of

[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-04 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. This patch seems really weird to me... We may be able to work around random lldb output in the test this way, but that won't help any other DAP client who ends up talking to lldb-vscode (or do they have similar workarounds already?). In fact it might make things worse

[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-03 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Although I am ok with this patch, it will only work if the unexpected output comes before we expect any packets or perfectly in between packets. Not sure we should do this. For example this would work: random outut Content Length:2 {} And this would work:

[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-03 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py:58 +while True: +line = f.readline().decode("utf-8") +if len(line) == 0: Prefer single quotes. Repository: rG LLVM Github Monorepo

[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-02 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Yes. This happens when lldb-vscode is run in stdin/stdout mode (which is what happens in tests and I've also seen some IDEs doing the same) and installed commands are doing "print". In this case the client gets data that does not start with `Content-Length`. This fixes

[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-02 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. So what is this fix actually doing? Allowing random STDOUT to be ignored? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70883/new/ https://reviews.llvm.org/D70883 ___

[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-01 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: clayborg, lanza, wallace. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. lldb-vscode has an issue when run in stdout/stdin mode because it will send all stdout generated by scripts through well.. stdout :) This is