[jira] [Commented] (OFBIZ-10430) Use `in` and spread operator in `gradlewSubprocess`
[ https://issues.apache.org/jira/browse/OFBIZ-10430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16519292#comment-16519292 ] Mathieu Lirzin commented on OFBIZ-10430: Thanks Jacques > Use `in` and spread operator in `gradlewSubprocess` > --- > > Key: OFBIZ-10430 > URL: https://issues.apache.org/jira/browse/OFBIZ-10430 > Project: OFBiz > Issue Type: Improvement >Reporter: Mathieu Lirzin >Assignee: Jacques Le Roux >Priority: Minor > Fix For: Upcoming Branch > > Attachments: > OFBIZ-10430_Use-in-and-spread-operator-in-gradlewSubprocess.patch > > > No functional change. The idea of using the spread operator is to have less > mutation involved. In Groovy, using operator overloads like {{in}} is more > idiomatic than using explicitly the associated method. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10430) Use `in` and spread operator in `gradlewSubprocess`
[ https://issues.apache.org/jira/browse/OFBIZ-10430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16519208#comment-16519208 ] Mathieu Lirzin commented on OFBIZ-10430: Hum I was trusting compilation to detect such issue but indeed at runtime the patch fails. Here is a version that should work: {code} def gradlewSubprocess(commandList) { def gradlew = os.contains('windows') ? 'gradlew.bat' : './gradlew' exec { commandLine(gradlew, "--no-daemon", *commandList) } } {code} > Use `in` and spread operator in `gradlewSubprocess` > --- > > Key: OFBIZ-10430 > URL: https://issues.apache.org/jira/browse/OFBIZ-10430 > Project: OFBiz > Issue Type: Improvement >Reporter: Mathieu Lirzin >Assignee: Jacques Le Roux >Priority: Minor > Fix For: Trunk > > Attachments: > OFBIZ-10430_Use-in-and-spread-operator-in-gradlewSubprocess.patch > > > No functional change. The idea of using the spread operator is to have less > mutation involved. In Groovy, using operator overloads like {{in}} is more > idiomatic than using explicitly the associated method. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10430) Use `in` and spread operator in `gradlewSubprocess`
[ https://issues.apache.org/jira/browse/OFBIZ-10430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16519039#comment-16519039 ] Jacques Le Roux commented on OFBIZ-10430: - Hi Mathieu, As I partly reported at OFBIZ-10428 for the in operator, this does not work on Windows. Also I got an error on line bq. exec \{ commandLine [gradleRunner, "--no-daemon", *commandList] } while using {{gradlew pullPluginSource -PpluginId=ebay}} with this code {code} def gradlewSubprocess(commandList) { def gradleRunner = os.contains('windows') ? 'gradlew.bat' : './gradlew' exec { commandLine [gradleRunner, "--no-daemon", *commandList] } {code} {code} C:\projectsASF\ofbiz>gradlew pullPluginSource -PpluginId=ebay :pullPluginFromSvn :pullPluginSource FAILED FAILURE: Build failed with an exception. * Where: Build file 'C:\projectsASF\ofbiz\build.gradle' line: 1045 * What went wrong: Execution failed for task ':pullPluginSource'. > Cannot cast object 'gradlew.bat' with class 'java.lang.String' to class 'int' {code} > Use `in` and spread operator in `gradlewSubprocess` > --- > > Key: OFBIZ-10430 > URL: https://issues.apache.org/jira/browse/OFBIZ-10430 > Project: OFBiz > Issue Type: Improvement >Reporter: Mathieu Lirzin >Assignee: Jacques Le Roux >Priority: Minor > Fix For: Trunk > > Attachments: > OFBIZ-10430_Use-in-and-spread-operator-in-gradlewSubprocess.patch > > > No functional change. The idea of using the spread operator is to have less > mutation involved. In Groovy, using operator overloads like {{in}} is more > idiomatic than using explicitly the associated method. -- This message was sent by Atlassian JIRA (v7.6.3#76005)