-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for new Quarto version for R pkg support
- Loading branch information
1 parent
f0d4538
commit 06678d5
Showing
1 changed file
with
16 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -377,8 +377,8 @@ class PreviewManager { | |
} | ||
|
||
private usesQuartoServeCommand(doc?: TextDocument) { | ||
return isQuartoShinyKnitrDoc(this.engine_, doc) || | ||
(isQuartoShinyDoc(this.engine_, doc) && semver.lte(this.quartoContext_.version, "1.4.414")); | ||
return isQuartoShinyKnitrDoc(this.engine_, doc) || | ||
(isQuartoShinyDoc(this.engine_, doc) && semver.lte(this.quartoContext_.version, "1.4.414")); | ||
} | ||
|
||
private previewRenderRequest(doc: TextDocument, format: string | null) { | ||
|
@@ -414,7 +414,7 @@ class PreviewManager { | |
} | ||
|
||
private async killPreview() { | ||
await killTerminal(kPreviewWindowTitle, async () => await this.previewTerminateRequest()); | ||
await killTerminal(kPreviewWindowTitle, async () => await this.previewTerminateRequest()); | ||
this.progressDismiss(); | ||
this.progressCancellationToken_ = undefined; | ||
} | ||
|
@@ -466,7 +466,7 @@ class PreviewManager { | |
|
||
// create base terminal command | ||
const cmd = terminalCommand(useServeCommand ? "serve" : "preview", this.quartoContext_, target); | ||
|
||
// extra args for normal docs | ||
if (!useServeCommand) { | ||
if (!doc) { | ||
|
@@ -483,8 +483,17 @@ class PreviewManager { | |
|
||
// use temp output-dir for R package | ||
if (isRPackageWorkspace && this.previewRPackageDirConfig()) { | ||
cmd.push("--output-dir", tmp.dirSync().name); | ||
cmd.push("--embed-resources"); | ||
const rPkgRequiredVersion = "1.5.39"; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
juliasilge
Author
Collaborator
|
||
if (semver.gte(this.quartoContext_.version, rPkgRequiredVersion)) { | ||
cmd.push("--output-dir", tmp.dirSync().name); | ||
cmd.push("--embed-resources"); | ||
} else { | ||
window.showWarningMessage( | ||
`Rendering requires Quarto version ${rPkgRequiredVersion} or greater`, | ||
{ modal: true } | ||
); | ||
return; | ||
} | ||
} | ||
|
||
// send terminal command | ||
|
@@ -698,7 +707,7 @@ class PreviewManager { | |
} | ||
|
||
private zoomLevel(uri?: Uri) { | ||
if (uri === undefined ||isHtmlContent(uri.toString())) { | ||
if (uri === undefined || isHtmlContent(uri.toString())) { | ||
return this.webviewManager_.getZoomLevelConfig(); | ||
} else { | ||
return undefined; | ||
|
@juliasilge Why is there a requirement to be using a pre-release version?
I don't think the VSCode extension should have requirement on pre-release.
Instead, for such thing a "preview" version of the extension would be preferable.
quarto-dev/quarto-cli#10143