Skip to content

Commit

Permalink
Relax deprecation messages
Browse files Browse the repository at this point in the history
The deprecation message for the channel create and close
operation has been removed to not annoy users of pipeline
which want to stay with the current syntax.

However the deprecation remains for those methods when
using DSL2.

Related: #1269
  • Loading branch information
pditommaso committed Aug 19, 2019
1 parent f5eef25 commit 454e78f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion modules/nextflow/src/main/groovy/nextflow/Channel.groovy
Expand Up @@ -74,7 +74,7 @@ class Channel {
@Deprecated
static DataflowChannel create() {
if( NF.isDsl2() )
log.warn("The channel `create` method is deprecated -- it will be removed in a future release")
throw new DeprecationException("Channel `create` method is not supported any more")
return CH.queue()
}

Expand Down Expand Up @@ -128,6 +128,8 @@ class Channel {
*/
@Deprecated
static DataflowVariable just( obj = null ) {
if( NF.dsl2 )
throw new DeprecationException("The operator `just` is not available anymore -- Use `value` instead.")
log.warn "The operator `just` is deprecated -- Use `value` instead."
value(obj)
}
Expand Down
Expand Up @@ -92,7 +92,6 @@ class ChannelEx {
static DataflowWriteChannel close(DataflowWriteChannel source) {
if( NF.isDsl2() )
throw new DeprecationException("Channel `close` method is not supported any more")
log.warn "The `close` operator is deprecated -- it will be removed in a future release"
return CH.close0(source)
}

Expand Down

0 comments on commit 454e78f

Please sign in to comment.