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

Upgrade to Groovy 4.0 #1114

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from
Draft

Upgrade to Groovy 4.0 #1114

wants to merge 8 commits into from

Commits on Jan 22, 2024

  1. Upgrade to Groovy 4.0.4

    olovy committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    60556d2 View commit details
    Browse the repository at this point in the history
  2. Upgrade to Gradle 7.5

    olovy committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    5abc9e1 View commit details
    Browse the repository at this point in the history
  3. Fix weird compilation errors on Groovy 4.0.4

    Seems like a new groovy compiler bug.
    Works in 3.0.9 and 4.0.2 but not in 4.0.4.
    
    Among other things static imports fail for constants in whelk.JsonLd.
    
    ```
    /home/olov/kod/librisxl/whelk-core/build/tmp/compileGroovy/groovy-java-stubs/se/kb/libris/Normalizers.java:2: error: cannot find symbol
    import static whelk.JsonLd.ID_KEY;
    ```
    
    Looks like it's an issue with joint Java + Groovy compilation
    ("groovy-java-stubs")
    olovy committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    b5baf78 View commit details
    Browse the repository at this point in the history
  4. Fix failing test because of bad implicit cast

    DocumentSpec > Cannot set created FAILED
        org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{@type=Publication, place={@type=Place, label=Stuttgart}, agent={@type=Agent, label=Thieme}}' with class 'java.util.LinkedHashMap' to class 'java.util.Collection' due to: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: java.util.Collection(LinkedHashMap)
            at whelk.converter.marc.MarcFieldHandler.convert_closure15(MarcFrameConverter.groovy:2145)
            at groovy.lang.Closure.call(Closure.java:418)
            at whelk.converter.marc.MarcFieldHandler.convert(MarcFrameConverter.groovy:2128)
            at whelk.converter.marc.MarcRuleSet.processFields_closure6(MarcFrameConverter.groovy:756)
            at groovy.lang.Closure.call(Closure.java:418)
            at whelk.converter.marc.MarcRuleSet.processFields(MarcFrameConverter.groovy:753)
            at whelk.converter.marc.MarcRuleSet.convert(MarcFrameConverter.groovy:746)
            at whelk.converter.marc.MarcConversion.convert(MarcFrameConverter.groovy:274)
            at whelk.converter.marc.MarcFrameConverter.runConvert(MarcFrameConverter.groovy:81)
            at whelk.converter.marc.MarcFrameConverter.convert(MarcFrameConverter.groovy:107)
            at whelk.DocumentSpec.Cannot set created(DocumentSpec.groovy:374)
    olovy committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    7bbcb35 View commit details
    Browse the repository at this point in the history
  5. Bump gretty to version 4.0.2

    olovy committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    bf27aee View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    aec72cd View commit details
    Browse the repository at this point in the history
  7. Fix Groovy 4 build errors

    olovy committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    96383a6 View commit details
    Browse the repository at this point in the history
  8. Bump Gradle version to 8.3

    olovy committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    dcfd377 View commit details
    Browse the repository at this point in the history