I really appreciate your answer Jesse, I am not planning on touching anything but I discovered this.. CPS stuff and is quite interesting, never heard of it and it is fascinating the applications it may have, that is the main reason I am deeply trying to understand the library.
Also, may I ask you as co-author what drove you to choose this style of programming? It is really amazing. Thank you in advance, Juanma. On Nov 20, 2019, 8:52 PM +0700, Jesse Glick <[email protected]>, wrote: > On Tue, Nov 19, 2019 at 10:27 AM medianopepeter > <[email protected]> wrote: > > I am not fully understanding how the resource translate.txt actually works > > I suppose you are referring to translatable.txt and > https://github.com/cloudbees/groovy-cps/blob/4916a1f80c5c8b1a1a23c2bf366d98be7e87ab56/dgm-builder/src/main/java/com/cloudbees/groovy/cps/tool/Translator.java#L189 > > > I see it is a list of methods from groovy to translate but seems that they > > are not all the methods listed in the DefaultGroovyMethods, > > DefaultGroovyStaticMethods and StringGroovyMethods. > > Correct, it is a subset. > > > how methods are chosen, what to translate and what no. > > GDK methods can be added to it when `Translator` bugs are fixed so > that the translation actually works, as verified mostly by > `CpsDefaultGroovyMethodsTest`. > > While curiosity is great, please be aware that no one is expecting to > make changes here other than for security vulnerabilities or critical > regressions: the code is so hard to follow (I am speaking as a > coauthor!) that we are reluctant to spend the time even reviewing > proposed support for the remaining methods. Few people will ever > notice that, say, `Set.takeWhile(Closure)` is not supported (as of > recent changes, this is called out with a runtime warning in the build > log), and these gaps are not so hard to work around with either > `@NonCPS` or just using more common idioms. In the longer term, we > would rather find ways to run scripts out of process so this library > (and `groovy-sandbox`) can be retired. > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3-_YHq02eF5d2%2Bqz7EuWC1y7KaAk2OSVAAwMJ408c7eA%40mail.gmail.com. -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/02f0f54e-4039-4cb5-bdb3-9e4be71c9e56%40Spark.
