On Mon, Aug 4, 2014 at 2:02 PM, Sagi Sinai-Glazer <[email protected]> wrote:
> I see that you've merged pull #8 for the plugin - are you updating
> the docker image demo file to reflect the new changes?

The merge did include matching changes to the demo job, but I have not
yet rebuilt the Docker image.

>> Untested but probably something like:
>>
>> parallel((1..maxValue).collect {ctr -> ctr: {-> doSomethingWith(ctr)}})
>>
>> (The ‘parallel’ step in Workflow takes “thread names” as the parameter
>> keys and closures as values.)
>
> Tried this - didn't work!

I am not sure of the Groovy syntax offhand for building a Map this
way, but I am sure you can look it up. You do need to ensure that
every key is a String—and currently GString (e.g., "with
${substitutions}") does not count.

> the ending prints of the flow (prefixed with timestamp) precede
> the prints of the actual threads it invoked.

Cannot really evaluate without the flow source. If you were using
Groovy’s built-in ‘println’, try using the ‘echo’ step instead.
println support is currently minimal and due to be rewritten.

> this was a simple example of Groovy syntax that doesn't work:
> def a=[1,2,3]
> println a[0] // [] for some reason is not supported and triggers the above
> exception which hangs the build

Ah yes, array index lookups are not yet implemented in the Groovy CPS
library, along with a variety of other miscellaneous operators. PRs to
kohsuke/groovy-cps welcome. In the meantime just restrict flow scripts
to the corresponding plain method calls, like get(int).

>>> when compilation/run-time errors are received, it's hard to find the right 
>>> erroneous line.
>
> I believe that this should be implemented for simple flows as well.

Well more useful than line numbers in the text area (which is
nonstandard and would not be supported even when we implement Code
Mirror support for this textarea, as is planned) would be error
messages that actually show some kind of context. Cannot recall if
Kohsuke already implemented proper stack traces.

Generally speaking there is a great deal of work to be done in
cleaning up corner cases in the CPS engine and better reporting error
conditions which we have deferred until a later time, possibly after
“1.0”. The focus is on making sure that you *can* write working
scripts that implement the major use cases.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to