REditorSupport / languageserver

An implementation of the Language Server Protocol for R
Other
581 stars 94 forks source link

Error in `extract_lines_out_blocks` #572

Closed renkun-ken closed 2 years ago

renkun-ken commented 2 years ago
[2022-09-15 13:59:15.116] Error: attempt to apply non-function
Call: .mapply(":", block_lines_list, NULL)
Stack trace:
1: .mapply(":", block_lines_list, NULL)
2: unlist(.mapply(":", block_lines_list, NULL), recursive = FALSE, 
    use.names = FALSE)
3: extract_lines_out_blocks(line_seq, block_lines_list)
4: get_r_document_sections_rec(content = content, start_line = 1L, 
    end_line = length(content), block_lines_list = block_lines_list)
5: get_r_document_sections_and_blocks(content = document$content, 
    xdoc = xdoc, symbol = TRUE)
6: get_document_symbols(document, xdoc = parse_data$xml_doc)
7: document_symbol_reply(id, uri, self$workspace, document, self$ClientCapabilities$textDocument$documentSymbol)
8: handler(self, item$id, item$params)
9: parse_callback(self, uri, version, result)
10: private$callback(result)
11: task$check()
12: self$parse_task_manager$check_tasks()
13: self$process_events()

[2022-09-15 13:59:15.117] exiting
renkun-ken commented 2 years ago

Looks like .mapply(":", ...) does not work on R 4.1. Should be fixed via .mapply(`:`, ...).

renkun-ken commented 2 years ago

Fixed via 57c99c9.