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

Compatibility with Groovy 2.5 #237

Closed
dawidsawa opened this issue Jun 6, 2018 · 1 comment
Closed

Compatibility with Groovy 2.5 #237

dawidsawa opened this issue Jun 6, 2018 · 1 comment
Milestone

Comments

@dawidsawa
Copy link

Perhaps due to some @Immutable AST transformation changes in Groovy 2.5, some methods are failing now.

Grgit.open().head() fails with the following:

Caught: java.lang.RuntimeException: Unsupported type (org.ajoberstar.grgit.Person) found for field 'author' while constructing immutable class org.ajoberstar.grgit.Commit.
Immutable classes only support properties with effectively immutable types including:
- Strings, primitive types, wrapper types, Class, BigInteger and BigDecimal, enums
- classes annotated with @KnownImmutable and known immutables (java.awt.Color, java.net.URI)
- Cloneable classes, collections, maps and arrays, and other classes with special handling
  (java.util.Date and various java.time.* classes and interfaces)
Other restrictions apply, please see the groovydoc for ImmutableOptions for further details
java.lang.RuntimeException: Unsupported type (org.ajoberstar.grgit.Person) found for field 'author' while constructing immutable class org.ajoberstar.grgit.Commit.
Immutable classes only support properties with effectively immutable types including:
- Strings, primitive types, wrapper types, Class, BigInteger and BigDecimal, enums
- classes annotated with @KnownImmutable and known immutables (java.awt.Color, java.net.URI)
- Cloneable classes, collections, maps and arrays, and other classes with special handling
  (java.util.Date and various java.time.* classes and interfaces)
Other restrictions apply, please see the groovydoc for ImmutableOptions for further details
        at org.ajoberstar.grgit.Commit.<init>(Commit.groovy)
        at org.ajoberstar.grgit.util.JGitUtil.convertCommit(JGitUtil.groovy:134)
        at org.ajoberstar.grgit.util.JGitUtil$convertCommit$2.callStatic(Unknown Source)
        at org.ajoberstar.grgit.util.JGitUtil.resolveCommit(JGitUtil.groovy:109)
        at org.ajoberstar.grgit.util.JGitUtil$resolveCommit$1.callStatic(Unknown Source)
        at org.ajoberstar.grgit.util.JGitUtil.resolveCommit(JGitUtil.groovy:98)
        at org.ajoberstar.grgit.util.JGitUtil$resolveCommit$0.call(Unknown Source)
        at org.ajoberstar.grgit.service.ResolveService.toCommit(ResolveService.groovy:93)
        at org.ajoberstar.grgit.service.ResolveService$toCommit.call(Unknown Source)
        at org.ajoberstar.grgit.Grgit.head(Grgit.groovy:153)
        at org.ajoberstar.grgit.Grgit$head$0.call(Unknown Source)

Grgit.open().branch.getCurrent() fails with the following:

Caught: java.lang.RuntimeException: Unsupported type (org.ajoberstar.grgit.Branch) found for field 'trackingBranch' while constructing immutable class org.ajoberstar.grgit.Branch.
Immutable classes only support properties with effectively immutable types including:
- Strings, primitive types, wrapper types, Class, BigInteger and BigDecimal, enums
- classes annotated with @KnownImmutable and known immutables (java.awt.Color, java.net.URI)
- Cloneable classes, collections, maps and arrays, and other classes with special handling
  (java.util.Date and various java.time.* classes and interfaces)
Other restrictions apply, please see the groovydoc for ImmutableOptions for further details
java.lang.RuntimeException: Unsupported type (org.ajoberstar.grgit.Branch) found for field 'trackingBranch' while constructing immutable class org.ajoberstar.grgit.Branch.
Immutable classes only support properties with effectively immutable types including:
- Strings, primitive types, wrapper types, Class, BigInteger and BigDecimal, enums
- classes annotated with @KnownImmutable and known immutables (java.awt.Color, java.net.URI)
- Cloneable classes, collections, maps and arrays, and other classes with special handling
  (java.util.Date and various java.time.* classes and interfaces)
Other restrictions apply, please see the groovydoc for ImmutableOptions for further details
        at org.ajoberstar.grgit.Branch.<init>(Branch.groovy)
        at org.ajoberstar.grgit.util.JGitUtil.resolveBranch(JGitUtil.groovy:209)
        at org.ajoberstar.grgit.util.JGitUtil$resolveBranch.call(Unknown Source)
        at org.ajoberstar.grgit.service.BranchService.current(BranchService.groovy:60)
        at org.ajoberstar.grgit.service.BranchService.getCurrent(BranchService.groovy:70)
        at org.ajoberstar.grgit.service.BranchService$getCurrent.call(Unknown Source)
@ajoberstar ajoberstar added this to the 2.3.0 milestone Jun 6, 2018
@ajoberstar
Copy link
Owner

Thanks for the report, I'll get this fixed in the next release.

@ajoberstar ajoberstar modified the milestones: 2.3.0, 3.0.0 Jul 3, 2018
ajoberstar added a commit that referenced this issue Jul 3, 2018
Update the core lib's dependencies to Groovy 2.5. Gradle still seems to
work fine with its 2.4 version.

This fixes #237.
ajoberstar added a commit that referenced this issue Jul 4, 2018
Update the core lib's dependencies to Groovy 2.5. Gradle still seems to
work fine with its 2.4 version.

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

No branches or pull requests

2 participants