Conversation
ca1e520 to
ef0d006
Compare
ef0d006 to
b3a1f75
Compare
andrewparmet
left a comment
There was a problem hiding this comment.
Thanks for picking up the migration to v2 - I have been away and didn't realize how much had been done since I last looked.
src/test/kotlin/build/buf/gradle/BreakingWithProtobufGradleTest.kt
Outdated
Show resolved
Hide resolved
|
@andrewparmet I was able to get almost everything to pass with fairly minimal changes:
This should allow things to move forward. Next steps are to get the ignored test to pass and do add additional test coverage for cases that combine |
src/main/kotlin/build/buf/gradle/ProtobufGradlePluginSupport.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/build/buf/gradle/ProtobufGradlePluginSupport.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/build/buf/gradle/ProtobufGradlePluginSupport.kt
Outdated
Show resolved
Hide resolved
|
I think there are still some test behaviors that need to be nailed down, but I think this is a reasonable milestone with all existing tests passing and minimal behavior changes. |
build.gradle.kts
Outdated
| implementation(libs.jacksonModuleKotlin) | ||
| implementation(libs.jacksonDataformatYaml) |
There was a problem hiding this comment.
nit: alphabetical order and separation of dependency types
| implementation(libs.jacksonModuleKotlin) | |
| implementation(libs.jacksonDataformatYaml) | |
| implementation(libs.jacksonDataformatYaml) | |
| implementation(libs.jacksonModuleKotlin) | |
gradle/libs.versions.toml
Outdated
| jacksonModuleKotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" } | ||
| jacksonDataformatYaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version.ref = "jackson" } |
There was a problem hiding this comment.
nit: alphabetical order
| jacksonModuleKotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" } | |
| jacksonDataformatYaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version.ref = "jackson" } | |
| jacksonDataformatYaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version.ref = "jackson" } | |
| jacksonModuleKotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" } |
| import java.io.File | ||
|
|
||
| internal class BufYamlGenerator { | ||
| val yamlMapper = ObjectMapper(YAMLFactory()).registerKotlinModule() |
| ): String { | ||
| val bufYaml = | ||
| bufYamlFile?.let { | ||
| yamlMapper.readValue(it, object : TypeReference<MutableMap<String, Any>>() {}) |
There was a problem hiding this comment.
|
For some reason a few tests were failing depending on how the Jackson object mapper was initialized. I will look into it further, but for now tests are all passing in CI. |
andrewparmet
left a comment
There was a problem hiding this comment.
I'd expect you to have to register the YAML module.
All tests pass now. A couple of tests now specify an older Buf version.
Older comment:
This currently disables two tests in
BreakingWithProtobufGradleTest:normally breaking schema with an ignoreschema with multi-directory workspaceI'm still trying to see if I can reasonably get them to pass.