Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class LinObserver implements TraceObserverV2 {
}

protected List<DataPath> collectScriptDataPaths(PathNormalizer normalizer) {
final allScripts = allScriptFiles()
final allScripts = allScriptFiles().sort()
final result = new ArrayList<DataPath>(allScripts.size()+1)
// the main script
result.add( new DataPath(
Expand All @@ -148,7 +148,7 @@ class LinObserver implements TraceObserverV2 {
final dataPath = new DataPath(normalizer.normalizePath(it.normalize()), Checksum.ofNextflow(it.text))
result.add(dataPath)
}
return result.sort{it.path}
return result
}

protected String storeWorkflowRun(PathNormalizer normalizer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import nextflow.lineage.serde.LinSerializable
@CompileStatic
class Workflow implements LinSerializable {
/**
* List of script files defining a workflow
* List of script files used by a workflow, starting with the main script
*/
List<DataPath> scriptFiles
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ class LinObserverTest extends Specification {
def store = new DefaultLinStore();
def uniqueId = UUID.randomUUID()
def scriptFile = folder.resolve("main.nf")
def module1 = folder.resolve("script1.nf"); module1.text = 'hola'
def module2 = folder.resolve("script2.nf"); module2.text = 'world'
def module1 = folder.resolve("a_script1.nf"); module1.text = 'hola'
def module2 = folder.resolve("b_script2.nf"); module2.text = 'world'
and:

def metadata = Mock(WorkflowMetadata){
Expand All @@ -139,7 +139,7 @@ class LinObserverTest extends Specification {
when:
def files = observer.collectScriptDataPaths(new PathNormalizer(metadata))
then:
observer.allScriptFiles() >> [ scriptFile, module1, module2 ]
observer.allScriptFiles() >> [ module2, scriptFile, module1 ]
and:
files.size() == 3
and:
Expand Down
Loading