Skip to content

Commit 4a4a87f

Browse files
committed
[GR-11776] Misc fixes.
PullRequest: fastr/1717
2 parents f3a0556 + 8f18368 commit 4a4a87f

File tree

2 files changed

+8
-3
lines changed
  • com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher
  • com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/graphics/R

2 files changed

+8
-3
lines changed

com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/REPL.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ private static <T> T run(ExecutorService executor, Callable<T> run) {
253253
} catch (PolyglotException e) {
254254
if (e.isExit()) {
255255
throw new ExitException(e.getExitStatus());
256+
} else if (e.isCancelled()) {
257+
throw e;
256258
}
257259
throw RMain.fatal(e, "Unexpected error " + e.getMessage());
258260
} catch (Exception e) {

com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/graphics/R/fastrGraphics.R

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ eval(expression({
115115
# Note: explicitly supported functions: din
116116
# Note: harmless functions that we do not override: co.intervals, hist.default, axTicks
117117
# Note: S3 dispatch functions that may dispatch to lattice/ggplot2/etc. implementation: hist, contour, lines, pairs, points, text
118+
# Note: we ignore plot.new because Shiny probably uses it for getting coordinates, but not for plotting itself
119+
120+
# Special case of grconvertX/Y used in Shiny
121+
grconvertX <- function(x, from, to) if (from == "user" && to == "nfc") round(x) else graphicsWarning("gcconvertX")(x, from, to)
122+
grconvertY <- function(x, from, to) if (from == "user" && to == "nfc") round(x) else graphicsWarning("gcconvertX")(x, from, to)
123+
plot.new <- function(...) { } # just ignore
118124

119125
abline <- graphicsWarning("abline");
120126
arrows <- graphicsWarning("arrows");
@@ -139,8 +145,6 @@ eval(expression({
139145
filled.contour <- graphicsWarning("filled.contour");
140146
fourfoldplot <- graphicsWarning("fourfoldplot");
141147
frame <- graphicsWarning("frame");
142-
grconvertX <- graphicsWarning("grconvertX");
143-
grconvertY <- graphicsWarning("grconvertY");
144148
grid <- graphicsWarning("grid");
145149
identify <- graphicsWarning("identify");
146150
image <- graphicsWarning("image");
@@ -162,7 +166,6 @@ eval(expression({
162166
pie <- graphicsWarning("pie");
163167
plot.design <- graphicsWarning("plot.design");
164168
plot.function <- graphicsWarning("plot.function");
165-
plot.new <- graphicsWarning("plot.new");
166169
plot.window <- graphicsWarning("plot.window");
167170
plot.xy <- graphicsWarning("plot.xy");
168171
points.default <- graphicsWarning("points.default");

0 commit comments

Comments
 (0)