Skip to content

add R package build task - build source and build binary like RStudio#1029

Merged
renkun-ken merged 4 commits intoREditorSupport:masterfrom
Yunuuuu:rpackage_dev
Mar 10, 2022
Merged

add R package build task - build source and build binary like RStudio#1029
renkun-ken merged 4 commits intoREditorSupport:masterfrom
Yunuuuu:rpackage_dev

Conversation

@Yunuuuu
Copy link

@Yunuuuu Yunuuuu commented Mar 8, 2022

RStudio provides two build task with devtools::build() and devtools::build(binary = TRUE, args = c('--preclean')), This PR provides r.buildbinary command to run devtools::build(binary = TRUE, args = c('--preclean')) as task and rename original r.build to r.buildsource.

package.json Outdated
},
{
"title": "Build",
"title": "Build Source",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about we keep "Build" (to not break existing keybindings) and adds "Build Binary"?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's really fine, and this will cause less errors for users already using this.

package.json Outdated
{
"title": "Build Binary",
"category": "R Package",
"command": "r.buildbinary"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better use r.buildBinary here for consistency.

src/extension.ts Outdated

// environment independent commands. this is a workaround for using the Tasks API: https://github.com/microsoft/vscode/issues/40758
'r.build': () => vscode.commands.executeCommand('workbench.action.tasks.runTask', 'R: Build'),
'r.buildsource': () => vscode.commands.executeCommand('workbench.action.tasks.runTask', 'R: BuildSource'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better to use R: Build and R: Build Binary as the task names?

@Yunuuuu
Copy link
Author

Yunuuuu commented Mar 10, 2022

Thanks for your help and suggestions, @renkun-ken, I have rename this conflicted names and keep r.build command

Copy link
Member

@renkun-ken renkun-ken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks!

@renkun-ken renkun-ken merged commit 1ebb8f2 into REditorSupport:master Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants