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

v3.4.0: toFlatConfig() is applicable for argument types: () values: [] #295

Open
sgeller opened this issue Feb 9, 2022 · 5 comments
Open

Comments

@sgeller
Copy link

sgeller commented Feb 9, 2022

As we upgraded the asset-pipeline from v3.3.6 to v3.4.0 we've encountered the following stack trace:

java.util.LinkedHashMap.toFlatConfig() is applicable for argument types: () values: []
		at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70)
		at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
		at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
		at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
		at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119)
		at asset.pipeline.AssetPipelineGrailsPlugin$_doWithSpring_closure2.doCall(AssetPipelineGrailsPlugin.groovy:106)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
		at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
		at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)

circling back to this 7916072#diff-5196ae3e10df42808b5a9addbe0a5fa15f8e72515238bd69057a32d43ac7a364R106 change.

Config used (same for both versions):

assets {
    minifyJs = true
    minifyCss = true
    enableSourceMaps = true

    // exclude dependent less files from being individually compiled
    excludes = ['less/**/*.less']

    minifyOptions = [ optimizationLevel: 'WHITESPACE_ONLY' ]

    // disable processing js directives require()
    configOptions = [commonJs: false]
}

Pinging @ltamaster as the author of the change. Please let me know if you need more information.

@davydotcom
Copy link
Contributor

which version of grails did you use this on

@sgeller
Copy link
Author

sgeller commented Feb 9, 2022

grailsVersion=4.0.10

@davydotcom
Copy link
Contributor

this is probably why as this was upgraded for grails5. ill see if i can have it handle either.

@sgeller
Copy link
Author

sgeller commented Feb 9, 2022

Thanks!

@matthijsbierman
Copy link

Was seeing the same exception on a new project with Grails 5.1.4 and asset pipeline 3.4.0. Fixed with 3.4.1.

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

3 participants