Skip to content

Commit a5b5907

Browse files
authored
Merge branch 'master' into cid-store
Signed-off-by: Jorge Ejarque <[email protected]>
2 parents 6b3293b + 2c53d9b commit a5b5907

File tree

29 files changed

+581
-325
lines changed

29 files changed

+581
-325
lines changed

docs/channel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In Nextflow there are two kinds of channels: *queue channels* and *value channel
2020
### Queue channel
2121

2222
A *queue channel* is a non-blocking unidirectional FIFO queue connecting a *producer* process (i.e. outputting a value)
23-
to a consumer process, or an operators.
23+
to a consumer process or an operator.
2424

2525
A queue channel can be created by factory methods ({ref}`channel-of`, {ref}`channel-path`, etc), operators ({ref}`operator-map`, {ref}`operator-flatmap`, etc), and processes (see {ref}`Process outputs <process-output>`).
2626

modules/nextflow/src/main/groovy/nextflow/ast/GStringToLazyVisitor.groovy

Lines changed: 0 additions & 121 deletions
This file was deleted.

modules/nextflow/src/main/groovy/nextflow/ast/NextflowDSLImpl.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ import nextflow.script.TokenStdoutCall
3636
import nextflow.script.TokenValCall
3737
import nextflow.script.TokenValRef
3838
import nextflow.script.TokenVar
39+
import nextflow.script.control.GStringToLazyVisitor
40+
import nextflow.script.control.TaskCmdXformVisitor
3941
import org.codehaus.groovy.ast.ASTNode
4042
import org.codehaus.groovy.ast.ClassCodeVisitorSupport
4143
import org.codehaus.groovy.ast.ClassNode

modules/nextflow/src/main/groovy/nextflow/ast/TaskCmdXform.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import java.lang.annotation.Target
2323

2424
import groovy.transform.CompileStatic
2525
import groovy.util.logging.Slf4j
26+
import nextflow.script.control.TaskCmdXformVisitor
2627
import org.codehaus.groovy.ast.ASTNode
2728
import org.codehaus.groovy.ast.ClassNode
2829
import org.codehaus.groovy.control.CompilePhase

modules/nextflow/src/main/groovy/nextflow/ast/TaskCmdXformVisitor.groovy

Lines changed: 0 additions & 62 deletions
This file was deleted.

modules/nextflow/src/main/groovy/nextflow/config/parser/v2/ConfigToGroovyXform.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import java.lang.annotation.RetentionPolicy
2222
import java.lang.annotation.Target
2323

2424
import groovy.transform.CompileStatic
25+
import nextflow.config.control.ConfigToGroovyVisitor
2526
import org.codehaus.groovy.ast.ASTNode
2627
import org.codehaus.groovy.control.CompilePhase
2728
import org.codehaus.groovy.control.SourceUnit

modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ class TaskProcessor {
639639
// -- map the inputs to a map and use to delegate closure values interpolation
640640
final secondPass = [:]
641641
int count = makeTaskContextStage1(task, secondPass, values)
642-
makeTaskContextStage2(task, secondPass, count)
642+
final foreignFiles = makeTaskContextStage2(task, secondPass, count)
643643

644644
// verify that `when` guard, when specified, is satisfied
645645
if( !checkWhenGuard(task) )
@@ -653,6 +653,9 @@ class TaskProcessor {
653653
if( checkStoredOutput(task) )
654654
return
655655

656+
// -- download foreign files
657+
session.filePorter.transfer(foreignFiles)
658+
656659
def hash = createTaskHashKey(task)
657660
checkCachedOrLaunchTask(task, hash, resumable)
658661
}
@@ -1928,7 +1931,7 @@ class TaskProcessor {
19281931
throw new ProcessUnrecoverableException("Not a valid path value: '$str'")
19291932
}
19301933

1931-
protected List<FileHolder> normalizeInputToFiles( Object obj, int count, boolean coerceToPath, FilePorter.Batch batch ) {
1934+
protected List<FileHolder> normalizeInputToFiles( Object obj, int count, boolean coerceToPath, FilePorter.Batch foreignFiles ) {
19321935

19331936
Collection allItems = obj instanceof Collection ? obj : [obj]
19341937
def len = allItems.size()
@@ -1939,10 +1942,11 @@ class TaskProcessor {
19391942

19401943
if( item instanceof Path || coerceToPath ) {
19411944
def path = normalizeToPath(item)
1945+
19421946
if (path instanceof RealPathAware){
19431947
path = path.toRealPath()
19441948
}
1945-
def target = executor.isForeignFile(path) ? batch.addToForeign(path) : path
1949+
def target = executor.isForeignFile(path) ? foreignFiles.addToForeign(path) : path
19461950
def holder = new FileHolder(target)
19471951
files << holder
19481952
}
@@ -2142,20 +2146,20 @@ class TaskProcessor {
21422146
return count
21432147
}
21442148

2145-
final protected void makeTaskContextStage2( TaskRun task, Map secondPass, int count ) {
2149+
final protected FilePorter.Batch makeTaskContextStage2( TaskRun task, Map secondPass, int count ) {
21462150

21472151
final ctx = task.context
21482152
final allNames = new HashMap<String,Integer>()
21492153

2150-
final FilePorter.Batch batch = session.filePorter.newBatch(executor.getStageDir())
2154+
final FilePorter.Batch foreignFiles = session.filePorter.newBatch(executor.getStageDir())
21512155

21522156
// -- all file parameters are processed in a second pass
21532157
// so that we can use resolve the variables that eventually are in the file name
21542158
for( Map.Entry<FileInParam,?> entry : secondPass.entrySet() ) {
21552159
final param = entry.getKey()
21562160
final val = entry.getValue()
21572161
final fileParam = param as FileInParam
2158-
final normalized = normalizeInputToFiles(val, count, fileParam.isPathQualifier(), batch)
2162+
final normalized = normalizeInputToFiles(val, count, fileParam.isPathQualifier(), foreignFiles)
21592163
final resolved = expandWildcards( fileParam.getFilePattern(ctx), normalized )
21602164

21612165
if( !param.isValidArity(resolved.size()) )
@@ -2183,9 +2187,7 @@ class TaskProcessor {
21832187
def message = "Process `$name` input file name collision -- There are multiple input files for each of the following file names: ${conflicts.keySet().join(', ')}"
21842188
throw new ProcessUnrecoverableException(message)
21852189
}
2186-
2187-
// -- download foreign files
2188-
session.filePorter.transfer(batch)
2190+
return foreignFiles
21892191
}
21902192

21912193
protected void makeTaskContextStage3( TaskRun task, HashCode hash, Path folder ) {

modules/nextflow/src/main/groovy/nextflow/script/parser/v2/ScriptCompiler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import nextflow.script.control.ModuleResolver;
3737
import nextflow.script.control.ResolveIncludeVisitor;
3838
import nextflow.script.control.ScriptResolveVisitor;
39+
import nextflow.script.control.ScriptToGroovyVisitor;
3940
import nextflow.script.control.TypeCheckingVisitor;
4041
import nextflow.script.parser.ScriptParserPluginFactory;
4142
import org.codehaus.groovy.ast.ASTNode;

modules/nf-commons/src/main/nextflow/plugin/PluginsFacade.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ class PluginsFacade implements PluginStateListener {
376376
}
377377

378378
// add tower plugin when config contains tower options
379-
if( (Bolts.navigate(config,'tower.enabled') || env.TOWER_ACCESS_TOKEN ) && !specs.find {it.id == 'nf-tower' } ) {
379+
if( (Bolts.navigate(config,'tower.enabled') || Bolts.navigate(config,'fusion.enabled') || env.TOWER_ACCESS_TOKEN ) && !specs.find {it.id == 'nf-tower' } ) {
380380
specs << defaultPlugins.getPlugin('nf-tower')
381381
}
382382
if( (Bolts.navigate(config,'wave.enabled') || Bolts.navigate(config,'fusion.enabled')) && !specs.find {it.id == 'nf-wave' } ) {

modules/nf-commons/src/test/nextflow/plugin/PluginsFacadeTest.groovy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ class PluginsFacadeTest extends Specification {
124124
then:
125125
result == [ new PluginSpec('nf-tower', '0.1.0') ]
126126

127+
// fusion requires both nf-tower and nf-wave
128+
when:
129+
handler = new PluginsFacade(defaultPlugins: defaults, env: [NXF_PLUGINS_DEFAULT:'true'])
130+
result = handler.pluginsRequirement([fusion:[enabled:true]])
131+
then:
132+
result == [ new PluginSpec('nf-tower', '0.1.0'), new PluginSpec('nf-wave', '0.1.0') ]
133+
127134
when:
128135
handler = new PluginsFacade(defaultPlugins: defaults, env: [:])
129136
result = handler.pluginsRequirement([wave:[enabled:true]])

0 commit comments

Comments
 (0)