nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: pion/webrtc
Pull request #589 (2019-04-05 18:50:03)

Disable quic by default; enable with build tag
Taking a more extreme approach than #588... This patch
disables quic by default. The advantage here would be
that webrtc builds with older versions of go than
quic-go supports (currently 1.12+).


Patch:
diff --git a/.travis.yml b/.travis.yml
index 8995e118..f6fc6d71 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,11 +32,11 @@ before_script:
   - go get github.com/mattn/goveralls
 
 script:
-  - golangci-lint run ./...
-  - cd examples && golangci-lint run ./... -D gochecknoinits
+  - golangci-lint run --build-tags quic ./...
+  - cd examples && golangci-lint run --build-tags quic ./... -D gochecknoinits
   - cd ..
   - rm -rf examples # Remove examples, no test coverage for them
-  - go test -coverpkg=$(go list ./... | tr '\n' ',') -coverprofile=cover.out -v -race -covermode=atomic ./...
+  - go test -tags quic -coverpkg=$(go list ./... | tr '\n' ',') -coverprofile=cover.out -v -race -covermode=atomic ./...
   - GOOS=js GOARCH=wasm go test -exec="./test-wasm/go_js_wasm_exec" -v .
   - goveralls -coverprofile=cover.out -service=travis-ci
   - bash .github/assert-contributors.sh
diff --git a/examples/ortc-quic/main.go b/examples/ortc-quic/main.go
index cbfe905a..b8ac1b69 100644
--- a/examples/ortc-quic/main.go
+++ b/examples/ortc-quic/main.go
@@ -1,3 +1,5 @@
+// +build quic
+
 package main
 
 import (
diff --git a/quicparameters.go b/quicparameters.go
index be562764..5675eda2 100644
--- a/quicparameters.go
+++ b/quicparameters.go
@@ -1,3 +1,5 @@
+// +build quic
+
 package webrtc
 
 // QUICParameters holds information relating to QUIC configuration.
diff --git a/quicrole.go b/quicrole.go
index 03cc22b0..b32d62f3 100644
--- a/quicrole.go
+++ b/quicrole.go
@@ -1,3 +1,5 @@
+// +build quic
+
 package webrtc
 
 // QUICRole indicates the role of the Quic transport.
diff --git a/quictransport.go b/quictransport.go
index 61a06752..ff9f1e83 100644
--- a/quictransport.go
+++ b/quictransport.go
@@ -1,4 +1,5 @@
 // +build !js
+// +build quic
 
 package webrtc
 


Test patch:
diff --git a/quicrole_test.go b/quicrole_test.go
index c9fa8b80..219adb21 100644
--- a/quicrole_test.go
+++ b/quicrole_test.go
@@ -1,3 +1,5 @@
+// +build quic
+
 package webrtc
 
 import (
diff --git a/quictransport_test.go b/quictransport_test.go
index 1de82900..2a8a4282 100644
--- a/quictransport_test.go
+++ b/quictransport_test.go
@@ -1,4 +1,5 @@
 // +build !js
+// +build quic
 
 package webrtc