askimed / nf-test

Simple test framework for Nextflow pipelines
https://www.nf-test.com
MIT License
146 stars 25 forks source link

Bug when using plugin methods in a `with` block #246

Open nvnieuwk opened 3 months ago

nvnieuwk commented 3 months ago

Hi!

A user reported some weird issue when trying to use the nft-bam bam() method in their test which resulted in a java.lang.IllegalArgumentException: argument type mismatch error. After some digging I noticed that this only happens when the method is used in a with block:

with (process.out.bam) {
    bam(get(0).get(1))
}

I'm not sure what is going wrong but it seemed like a bug in the plugin implementation from what I saw in the stack trace. You can find a reproducible example in the original issue

Thank you! -Nicolas