Skip to content

Verifying the version of binary tool too early #1762

Closed
@andrewparmet

Description

@andrewparmet

Trying to put #1208 into action and running into a dependency issue - it looks like Spotless is validating the provided version at configuration time, which is earlier than the value of toolVersion on BufExtension is resolvable to anything but its default.

An abridged version of my configuration:

configure<BufExtension> {
    toolVersion = "1.25.0"
}

configure<SpotlessExtension> {
    protobuf {
        buf("1.25.0").pathToExe(configurations.getByName(BUF_BINARY_CONFIGURATION_NAME).singleFile.absolutePath)
    }
}

This fails because the default value for toolVersion is 1.17.0 and resolving the Buf binary configuration is too eager.

Do you know if it's possible to:

  • postpone this verification until we can read the BufExtension correctly?
  • remove the verification?

Or if there's another approach that would be better?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions