Skip to content

Commit b966f68

Browse files
committed
revert later() workspace scan, and bump version 3.0.6
1 parent 8ae7954 commit b966f68

4 files changed

Lines changed: 4 additions & 28 deletions

File tree

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
## 3.0.6 - 2026-03-17
44

5-
* Added later package to scan and update workspace in a later time.
65
* Removed "No text editor active." warning pop-up.
76

87
## 3.0.5 - 2026-01-04

R/session/vsc.R

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -728,16 +728,7 @@ workspace_file <- file.path(dir_session, "workspace.json")
728728
workspace_lock_file <- file.path(dir_session, "workspace.lock")
729729
file.create(workspace_lock_file, showWarnings = FALSE)
730730

731-
# Deferred workspace scanning - scan when R is idle, not immediately after command
732-
pending_workspace_scan <- NULL
733-
workspace_scan_delay <- getOption("vsc.workspace_scan_delay", 0.2) # 200ms default
734-
use_later <- requireNamespace("later", quietly = TRUE)
735-
if (!use_later) {
736-
message("Install package `later` for improved terminal responsiveness: install.packages('later')")
737-
}
738-
739-
do_workspace_scan <- function() {
740-
pending_workspace_scan <<- NULL
731+
update_workspace <- function(...) {
741732
tryCatch({
742733
data <- list(
743734
search = search()[-1],
@@ -747,20 +738,6 @@ do_workspace_scan <- function() {
747738
jsonlite::write_json(data, workspace_file, force = TRUE, pretty = FALSE)
748739
cat(get_timestamp(), file = workspace_lock_file)
749740
}, error = message)
750-
}
751-
752-
update_workspace <- function(...) {
753-
if (use_later) {
754-
# Cancel any pending scan (debounce)
755-
if (!is.null(pending_workspace_scan)) {
756-
tryCatch(later::later_cancel(pending_workspace_scan), error = function(e) NULL)
757-
}
758-
# Schedule scan after delay (runs when R is idle)
759-
pending_workspace_scan <<- later::later(do_workspace_scan, delay = workspace_scan_delay)
760-
} else {
761-
# Fallback: immediate scan if 'later' not available
762-
do_workspace_scan()
763-
}
764741
TRUE
765742
}
766743
update_workspace()

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "r",
33
"displayName": "R",
44
"description": "R Extension for Visual Studio Code",
5-
"version": "3.0.5",
5+
"version": "3.0.6",
66
"author": "REditorSupport",
77
"license": "SEE LICENSE IN LICENSE",
88
"publisher": "REditorSupport",

0 commit comments

Comments
 (0)