Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Groovy 2.5.x #697

Closed
suic86 opened this issue Feb 12, 2019 · 12 comments
Closed

Groovy 2.5.x #697

suic86 opened this issue Feb 12, 2019 · 12 comments

Comments

@suic86
Copy link

suic86 commented Feb 12, 2019

Please add or update the Groovy version to 2.5.5.

@kazk kazk self-assigned this Feb 20, 2019
@kazk kazk added the status/ready Ready to be deployed label Feb 20, 2019
@kazk
Copy link
Member

kazk commented Feb 21, 2019

I'll add Groovy 2.5.6. We'll see if existing content works with 2.5 and remove 2.4 once it's unnecessary.

@kazk kazk removed the status/ready Ready to be deployed label Feb 22, 2019
@kazk
Copy link
Member

kazk commented Feb 22, 2019

Groovy 2.5 is now available. I'm planning to run a script to update compatible kata, but not today.
Play with it and let me know if you find any issues.

@kazk kazk closed this as completed Feb 22, 2019
@suic86
Copy link
Author

suic86 commented Feb 22, 2019

@kazk there are not that many backwards incompatible changes, so I expected that there won't be issue with kata. However, when I tried to republish this kata with Groovy version, I got the annoying "Default Version is not a supported version" message. I remember that it was similar with Python 2.x vs. 3.x in the past.

@kazk
Copy link
Member

kazk commented Feb 22, 2019

@suic86 Sorry about that. Some parts of Codewars are still unclear to me :( What happens if you validate with 2.5 and republish?

@suic86
Copy link
Author

suic86 commented Feb 22, 2019

@kazk no problem. Apparently, it requires some testing :) I've checked this with three other katas with the same result. I do the following:

  1. Open kata in editor
  2. Change language to Groovy 2.5
  3. Validate and publish

The publishing takes quite a while and then it fails with "Default Version is not a supported version".

@kazk
Copy link
Member

kazk commented Feb 22, 2019

@suic86 OK, I figured out what's going on.

This happens when a new language version is set to the default language version without any code change. For some reason, Codewars doesn't add the new language version to the list of supported language versions of the kata when nothing else is changed. So it fails with "Default Version is not a supported version". when validating the data.

Until I run the script to update compatible kata or fix this weird bug, you can enable 2.5 by changing some code (e.g., adding empty line) and republishing. Hungarian Vowel Harmony (easy) has Groovy 2.5 now.

@suic86
Copy link
Author

suic86 commented Feb 22, 2019

@kazk thanks for explanation. This behavior is IMO a bug. :)

@kazk
Copy link
Member

kazk commented Feb 22, 2019

I know, I'll see if I can figure out where this comes from. Codewars is full of things like this.

@kazk
Copy link
Member

kazk commented Feb 23, 2019

@suic86 I ran a script to update compatible ones to use Groovy 2.5. So most of them can use 2.5 now.

These were not compatible with 2.5. Can you look into what's wrong if you've completed them already and update them?

@suic86
Copy link
Author

suic86 commented Feb 23, 2019

@kazk: The problem with the first two is explained in Breaking Changes for 2.5.0:

The extension methods for the java.util.Date class are now in a separate groovy-dateutil module which isn’t included by default when using the groovy-all pom dependency.

I've used 2.5.6 with Java 9 for Calendar Week translation and I didn't experience any issues but with Java 8 used on CW I was able to reproduce the issue locally. This one I fixed today but a better solution would be install groovy-all as it's suggested in the release notes.

I haven't solved the other three yet :)

@kazk
Copy link
Member

kazk commented Feb 23, 2019

Thanks, I'll add org.codehaus.groovy:groovy-dateutil:2.5.6 then.

@kazk
Copy link
Member

kazk commented Feb 27, 2019

Added org.codehaus.groovy:groovy-dateutil:2.5.6

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

No branches or pull requests

2 participants