Skip to content

Unresolved reference 'decodeBase64' #1287

@sugmanue

Description

@sugmanue

Describe the bug

Building the smithy protocol tests with a standalone smithy-build.json creates Kotlin files that cannot be compiled.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected behavior

The project should compile without unresolved references

Current behavior

The project fails to build with Unresolved reference 'decodeBase64'

Steps to Reproduce

  1. Checkout smithy-kotlin, build it and publish to maven local (./gradle clean build pTML)
  2. Create an smithy-build.json files with
{
    "version": "1.0",
    "outputDirectory": "build/output",
    "maven": {
        "repositories": [
            {
                "url": "file:///${HOME}/.m2/repository"
            },
            {
                "url": "https://repo.maven.apache.org/maven2"
            }

        ],
        "dependencies": [
            "software.amazon.smithy:smithy-aws-traits:1.57.1",
            "software.amazon.smithy:smithy-aws-protocol-tests:1.57.1",
            "software.amazon.smithy:smithy-protocol-tests:1.57.1",
            "software.amazon.smithy.kotlin:smithy-kotlin-codegen:0.34.17-SNAPSHOT",
            "software.amazon.smithy.kotlin:smithy-aws-kotlin-codegen:0.34.17-SNAPSHOT"
        ]
    },
    "plugins": {
        "kotlin-codegen": {
            "service": "aws.protocoltests.restjson#RestJson",
            "package": {
                "name": "com.amazon.aws.sdk",
                "version": "2018-01-01"
            },
            "build": {
                "generateFullProject": true,
                "optInAnnotations": ["aws.smithy.kotlin.runtime.InternalApi"],
                "rootProject": true
            }                    
        }
    }            
}
  1. Build the project running smithy build
  2. Build the codegen Kotlin project by running cd build/output/source/kotlin-codegen/; gradle clean build

Possible Solution

See #1281

Context

No response

Smithy-Kotlin version

latest

Platform (JVM/JS/Native)

any

Operating system and version

linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions