Skip to content

Commit

Permalink
Apply suggestions from review
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Nov 20, 2024
1 parent 4a1f3fa commit c6ec4dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -577,11 +577,10 @@ class NextflowDSLImpl implements ASTTransformation {
/**
* Transform a DSL `process` definition into a proper method invocation
*
* @param name
* @param methodCall
* @param unit
*/
protected void convertProcessBlock( String name, MethodCallExpression methodCall, SourceUnit unit ) {
protected void convertProcessBlock( MethodCallExpression methodCall, SourceUnit unit ) {
log.trace "Apply task closure transformation to method call: $methodCall"

final args = methodCall.arguments as ArgumentListExpression
Expand Down Expand Up @@ -641,9 +640,8 @@ class NextflowDSLImpl implements ASTTransformation {
readSource(stm,source,unit)
break

case 'shell':
log.warn1 "Process $name > the `shell` block is deprecated, use `script` instead"
case 'script':
case 'shell':
bodyLabel = currentLabel
iterator.remove()
execStatements << stm
Expand Down Expand Up @@ -1365,7 +1363,7 @@ class NextflowDSLImpl implements ASTTransformation {
methodCall.setArguments( args )

// now continue as before !
convertProcessBlock(name, methodCall, unit)
convertProcessBlock(methodCall, unit)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ class TaskProcessor {
this.ownerScript = script
this.config = config
this.taskBody = taskBody
if( taskBody.isShell )
log.warn1 "Process ${name} > the `shell` block is deprecated, use `script` instead"
this.name = name
this.maxForks = config.maxForks && config.maxForks>0 ? config.maxForks as int : 0
this.forksCount = maxForks ? new LongAdder() : null
Expand Down

0 comments on commit c6ec4dc

Please sign in to comment.