Closed lauzadis closed 8 months ago
Usage of AttributeKey in endpoints code generation fails with Not enough information to infer type variable T.
AttributeKey
Not enough information to infer type variable T
Example usage:
return Endpoint( Url.parse("${url?.scheme}://${url?.authority}/${uriEncodedBucket}${url?.path}"), attributes = attributesOf { AttributeKey("backend") to "FOOBAR" // Not enough information to infer type variable T SigningContextAttributeKey to listOf( sigV4( serviceName = "s3", disableDoubleUriEncode = true, signingRegion = "${params.region}", ), ) }, )
The fix is to provide the type for AttributeKey<T>. New codegen will look like:
AttributeKey<T>
AttributeKey.create("backend", "FOOBAR") to "FOOBAR"
This is done to avoid type-parsing at codegen and just let the Kotlin compiler work it out.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Kudos, SonarCloud Quality Gate passed!
0 Bugs 0 Vulnerabilities 0 Security Hotspots 0 Code Smells
No Coverage information 0.0% Duplication
Usage of
AttributeKey
in endpoints code generation fails withNot enough information to infer type variable T
.Example usage:
The fix is to provide the type for
AttributeKey<T>
. New codegen will look like:This is done to avoid type-parsing at codegen and just let the Kotlin compiler work it out.
Issue \
Description of changes
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.