`ark` discussion notes
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
Hướng nghiên cứu
Issue không nêu tên tệp hay bài kiểm thử nào của ark; trước tiên hãy đọc các tệp debugadapter được tham chiếu là R/breakpoints.R và R/debug_prompt.R, sau đó tái hiện ví dụ về điều kiện debug()/browser() của base R. Trước khi triển khai, hãy chuyển các ghi chú thành một thay đổi cụ thể cho ark kèm điều kiện chấp nhận; issue hiện tại chưa định nghĩa việc hoàn thành.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I had the pleasure of getting to chat a bit with @lionel- at posit::conf and just wanted to track a few notes that came out of the discussion.
tips for debugadapter
- Recommendation to use
later. From what I can tell, this will allow for easy management of a background thread that can affect the global environment. Quick POC:
looks like a totally viable solution to me. I don't really care about non-interruptable code as we just need to periodically listen for new state from the adapter at the top level. In fact, it might even offer a better alternative to running the debugger in a separate process.i <- 0 f <- function() { i <<- i + 1; later::later(f, 1) } f() # wait n seconds.. Sys.sleep will not work because bg thread can't use interrupts i # [1] <n> - Lionel mentioned a few edge cases where either the source isn't known (not yet sourced.. if there were other cases I forgot them)
- Lionel mentioned foreseen challenges with getting the source from lines sent to the console from a selection, suggesting that it might require a wrapping function for sending code with a "faked" srcref.
learnings from debugadapter for ark
- Mentioned that managing
trace()insertions ofbrowser()statements was painful.tracewill affect the function's body, meaning that multiple insertions need to account for the difference between source and traced version of the code (ie, a breakpoint at line 10 in the file open in a user's editor might actually want to insert a newbrowser()at line 11 because abrowser()statement has already been inserted at some point above). This is otherwise an attractive option, since the browser statement can be inserted at an arbitrary location (easily found withutils::findLineNum()) debug()simplifies this, as it will not insert code. However it introduces a new challenge - thatdebug()always enters the debug prompt upon entering a debugged function. Currently, I automatically step through the function until a breakpoint is hit. This still emits all the debug prompt output, so you get a bunch of messages as R steps through the lines of the function. Definitely still room for improvement.
for both.. potential bug?
- Mentioned bug with
debug(), in which theconditionargument seems to have no effect. Might be a base R bug, or at least a devel R bug.options(browser.hook = function(hook, condition, envir) { print(condition) }) f <- function() { print("123"); browser(condition = list(origin = "browser")) } debug(f, condition = list(origin = "globalenv")) f() # ... #> debug at #1: browser(condition = list(origin = "browser")) #> NULL # debug() condition output #> $origin # browser() condition output #> [1] "browser"
- Ngôn ngữ chính
- R
- Star
- 20
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dgkf/debugadapter
-
Using `{later}` to sync stateĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
dgkf/debugadapter#25 · 3 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
dgkf/debugadapter#18 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
dgkf/debugadapter#15 · 5 bình luận · 2 reaction ·
-
Robustness of stdout parsingĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
dgkf/debugadapter#13 · 3 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
dgkf/debugadapter#11 · 2 bình luận ·
Tất cả issue của dgkf/debugadapter
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
mitchelloharawild/ggtime#39 ·
-
Add more snippets to R and JuliaĐang mởenhancement good first issue help wanted
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Link to the published paperĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
GSK-Biostatistics/multigrain#43 ·
Maintainer thường phản hồi trong vòng 1 ngày