Skip to content
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

Update diff.groovy to work with latest GROOVY version #671

Open
Kevin222004 opened this issue Oct 23, 2022 · 5 comments
Open

Update diff.groovy to work with latest GROOVY version #671

Kevin222004 opened this issue Oct 23, 2022 · 5 comments

Comments

@Kevin222004
Copy link
Contributor

Kevin222004 commented Oct 23, 2022

Currently we are using the older groovy version 2.4.8 we should update it with the latest

This is the command line output when we run script on groovy version 4.0.5

kevin@inspiron-15-5510:~/Desktop/check_style/checkstyle/contribution/checkstyle-tester
 $ groovy diff.groovy --localGitRepo /home/kevin/Desktop/check_style/checkstyle/checkstyle  \
   --baseBranch master --patchBranch ParenPad2 \
   --config /home/kevin/Desktop/check_style/checkstyle/confinff.xml   \
   --listOfProjects projects-to-test-on.properties

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/home/kevin/Desktop/check_style/checkstyle/contribution/checkstyle-tester/diff.groovy: 53: 
unable to resolve class CliBuilder
 @ line 53, column 15.
       def cli = new CliBuilder(usage:'groovy diff.groovy [options]', header: ....
                 ^

/home/kevin/Desktop/check_style/checkstyle/contribution/checkstyle-tester/diff.groovy: 650:
 unable to resolve class AntBuilder
 @ line 650, column 5.
       new AntBuilder().replace(
       ^

/home/kevin/Desktop/check_style/checkstyle/contribution/checkstyle-tester/diff.groovy: 658:
 unable to resolve class AntBuilder
 @ line 658, column 5.
       new AntBuilder().copy(todir: destination) {
       ^

/home/kevin/Desktop/check_style/checkstyle/contribution/checkstyle-tester/diff.groovy: 664:
 unable to resolve class AntBuilder
 @ line 664, column 5.
       new AntBuilder().move(todir: destination) {
       ^

/home/kevin/Desktop/check_style/checkstyle/contribution/checkstyle-tester/diff.groovy: 670:
 unable to resolve class AntBuilder
 @ line 670, column 5.
       new AntBuilder().delete(dir: dir, failonerror: false)
       ^

5 errors
@checkstyle checkstyle deleted a comment from rnveach Dec 29, 2022
@romani
Copy link
Member

romani commented Dec 29, 2022

yes we need to update script to work with modern Groovy.

@rnveach
Copy link
Member

rnveach commented Dec 30, 2022

@nrmancuso Since you are always working with CI, is this possibly to upgrade all our CIs to work with the latest groovy? You have a list of possibly things we would need to do for this?

@nrmancuso
Copy link
Member

nrmancuso commented Dec 31, 2022

In a perfect world, all the CI we use would allow us to use custom images. Then, we could just keep our checkstyle/jdk-11-groovy-git-mvn:11.0.13__3.0.9__2.25.1__3.6.3 image up to date and use it for all tasks. Ubuntu favors stability over newer packages, so we will require a custom image or package installation in CI (I would rather avoid this in most cases).

Package managers that aren't part of the distro (think sdkman) can be unreliable, and installation of larger packages like java, maven, etc. take a while.

I think we should set up CircleCI in this repo (since it allows custom image usage), and migrate all travis jobs to it. Then we can make a new custom image with newer groovy version, and begin migration of groovy scripts.

@nrmancuso nrmancuso changed the title Update the Script to work with latest GROOVY version Update diff.groovy to work with latest GROOVY version Dec 31, 2022
@nrmancuso
Copy link
Member

nrmancuso commented Dec 31, 2022

@rnveach
Copy link
Member

rnveach commented Dec 31, 2022

@nrmancuso I clicked on start building in that link. Let me know if you need anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants