-
Notifications
You must be signed in to change notification settings - Fork 13
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
buf-gradle-plugin build fails on newer Buf CLIs #207
Comments
Here's the patch I used to run the tests and debug them better: diff --git a/src/main/kotlin/build/buf/gradle/BufExtension.kt b/src/main/kotlin/build/buf/gradle/BufExtension.kt
index 6c2534a..4774fab 100644
--- a/src/main/kotlin/build/buf/gradle/BufExtension.kt
+++ b/src/main/kotlin/build/buf/gradle/BufExtension.kt
@@ -49,7 +49,7 @@ open class BufExtension {
/**
* Specify the version of Buf.
*/
- var toolVersion = "1.27.1"
+ var toolVersion = "1.34.0"
internal var buildDetails: BuildDetails? = null
diff --git a/src/test/kotlin/build/buf/gradle/AbstractBufIntegrationTest.kt b/src/test/kotlin/build/buf/gradle/AbstractBufIntegrationTest.kt
index 921835c..fcaaf6e 100644
--- a/src/test/kotlin/build/buf/gradle/AbstractBufIntegrationTest.kt
+++ b/src/test/kotlin/build/buf/gradle/AbstractBufIntegrationTest.kt
@@ -19,13 +19,14 @@ import org.gradle.language.base.plugins.LifecycleBasePlugin.CHECK_TASK_NAME
import org.gradle.testkit.runner.GradleRunner
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.TestInfo
+import org.junit.jupiter.api.io.CleanupMode
import org.junit.jupiter.api.io.TempDir
import java.io.File
import java.nio.file.Paths
import java.util.Locale
abstract class AbstractBufIntegrationTest : IntegrationTest {
- @TempDir
+ @TempDir(cleanup = CleanupMode.ON_SUCCESS)
lateinit var projectDir: File
val buildFile
@@ -75,7 +76,7 @@ abstract class AbstractBufIntegrationTest : IntegrationTest {
override fun checkRunner() = gradleRunner().withArguments(CHECK_TASK_NAME)
- fun publishRunner() = gradleRunner().withArguments("publish")
+ fun publishRunner() = gradleRunner().withArguments("publish", "--info")
fun File.replace(
oldValue: String, |
Fixed by #213 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I attempted to upgrade the plugin from 1.27.1 to 1.34.0 (latest release) and saw these test failuires:
Tests:
BreakingWithProtobufGradleTest - normally breaking schema with an ignore
BreakingWithWorkspaceTest - normally breaking schema with an ignore
Error:
These tests appear to copy a file tree:
into a directory (under
build/
) consisting of:The generated
buf.work.yaml
contains:This needs more investigation but ideally for v2 configs we wouldn't need to create any filesystem structure like this during the build. A user should be able to use the plugin entirely from the root
buf.yaml
file with a config like:The text was updated successfully, but these errors were encountered: