Skip to content

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

Merged
renkun-ken merged 4 commits into
REditorSupport: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 into
REditorSupport:masterfrom
Yunuuuu:rpackage_dev

Conversation

@Yunuuuu

@Yunuuuu Yunuuuu commented Mar 8, 2022

Copy link
Copy Markdown

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.

Comment thread package.json Outdated
},
{
"title": "Build",
"title": "Build Source",

Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread package.json Outdated
{
"title": "Build Binary",
"category": "R Package",
"command": "r.buildbinary"

Copy link
Copy Markdown
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.

Comment thread 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
Copy Markdown
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

Yunuuuu commented Mar 10, 2022

Copy link
Copy Markdown
Author

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

@renkun-ken renkun-ken left a comment

Copy link
Copy Markdown
Member

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