add in groups#3
Conversation
|
Sorry one final change from me here. I've made a few significant changes.
|
|
Thanks for working on this! The changes make very good sense.
The multi-root workspace space support is great!
I was considering this too. The
I'm not sure if there is a natural way to allow these usages. |
|
EDIT: Removed original message: I was hitting a problem in that you are not allowed to change the definition of a user defined task. I was trying to insert default arguments if the user had left a field blank but apparently it just silently errors if you do that -.- |
My current thinking is that if the user wants tasks to run arbitrary commands then they can just write those tasks themselves. I don't see the value getting the extension to be a proxy for that if its not actually going to fill in any of the missing components. I quite liked the idea of having our default task be a way for users to specify R code as that's actually adding a service. I'm also thinking that if we need to support more things like
I wasn't really sure how best to handle this, I'm kindof against having a popup box ask for the R version as I'm willing to bet that >95% of R users only have 1 version of R installed so it would be a hassle for them. I was wondering instead if it would make more sense to go the same route as python where you can click the bar on the bottom left which then lauches a popup to select the desired interpreter: |
|
Ok sorry last message and commit (pending review feedback) I have some additional changes that I want to make to the pattern matchers but I will wait until this has been merged before I work on that as I'm concious this is already becoming quite a big change. In the above commit 316b6b2 I added the following:
This image below shows a user defined task taking advantage of our This image just shows I haven't broken any of the prior changes, i.e. this shows that when executing "run build tasks" that it correctly identifies workspace 1 & 3 as being R packages and ignores workspace 2. |
src/tasks.ts
Outdated
| ) {} | ||
| } | ||
| const getRterm = async function ():Promise<string> { | ||
| const termOptions = await makeTerminalOptions(); |
There was a problem hiding this comment.
We should not use r.rterm.* here, it is used for interactive terminal (e.g. radian). We should only use r.rpath.* in tasks.
src/tasks.ts
Outdated
| for (const rtask of rtasks) { | ||
| const task = asTask(folder, rtask); | ||
| for (const rtask of RTasksMeta) { | ||
| const task = await asRTask(folder, rtask); |
There was a problem hiding this comment.
Does it make more sense to only getRPath once before the loop first? I don't see a need to await each task to get the same rpath.
There was a problem hiding this comment.
@renkun-ken , You are right. If you do make the changes just be sure to also call getRPath in the resolve function as well as the provide function. Perhaps add it as an additional argument to asRTask
|
I'll directly make some changes to address these problems. |
| "description": "R code to be executed" | ||
| }, | ||
| "args": { | ||
| "options": { |
There was a problem hiding this comment.
There are multiple terms that might look confusing: args, code args, etc.
Let's use their official terms:
$ R --help
Usage: R [options] [< infile] [> outfile]
|
LGTM |





In this PR I added:
DESCRIPTIONfileFor the last 2 point please see my comment below
EDIT: Just to say I'm not precious about the formatting or engineering so feel free to change completely if you don't like the way I've styled / laid it out!