-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: new dsl syntax to explicit declaration of plugin extensions #2820
feature: new dsl syntax to explicit declaration of plugin extensions #2820
Conversation
modules/nextflow/src/main/groovy/nextflow/extension/ChannelExtensionDelegate.groovy
Show resolved
Hide resolved
modules/nextflow/src/main/groovy/nextflow/extension/ChannelFactoryInstance.groovy
Outdated
Show resolved
Hide resolved
modules/nextflow/src/main/groovy/nextflow/script/IncludeDef.groovy
Outdated
Show resolved
Hide resolved
modules/nextflow/src/main/groovy/nextflow/script/ScriptBinding.groovy
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, it looks very good. Mostly think it would be better to comment a bit more especially groovy magic extension methods.
Also, we can get rid of the scope mechanism, and therefore of this
nextflow/modules/nextflow/src/main/java/groovy/runtime/metaclass/NextflowDelegatingMetaClass.java
Lines 69 to 76 in 6b45b50
@Override | |
public Object getProperty(Object object, String property) { | |
// check if the property name is | |
ChannelFactory ext = Channel.class.equals(object) && plugin!=null | |
? plugin.getChannelFactory(property) | |
: null; | |
return ext != null ? ext : delegate.getProperty(object, property); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I've removed the code related to the scope handling. Since it was only used by the SQL plugin, we can leave with a breaking chance and simplify the implementation.
I've left some other comments
modules/nextflow/src/main/groovy/nextflow/extension/ChannelExtensionDelegate.groovy
Show resolved
Hide resolved
modules/nextflow/src/main/groovy/nextflow/extension/ChannelExtensionDelegate.groovy
Outdated
Show resolved
Hide resolved
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
closes #2804 Signed-off-by: Jorge Aguilera <jorge.aguilera@seqera.io>
add comments and minor changes Signed-off-by: Jorge Aguilera <jorge.aguilera@seqera.io>
upgrade jgit Signed-off-by: Jorge Aguilera <jorge.aguilera@seqera.io>
revert to jgit 5.2.1 Signed-off-by: Jorge Aguilera <jorge.aguilera@seqera.io>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
use nf-hello instead nf-sql to test dsl Signed-off-by: Jorge Aguilera <jorge.aguilera@seqera.io>
fix test Signed-off-by: Jorge Aguilera <jorge.aguilera@seqera.io>
ec1ef2b
to
c9ab37e
Compare
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
I've made naming refactoring and added some comments. Think we can merge if all tests are ok |
We still have the double build 🤦 |
Released along with version |
This PR implements the new
import
plugin functionality by reusing theIncludeDef
process creating a Map of alias and methods implemented into the pluginit intercepts the missing static method into the Channel class and reroutes the call to the corresponding ExtensionPoint function
closes #2804