PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: apple/swift-syntax (swift)

Issue:
Enable `MemoryLayoutTest` in CI/release builds
`MemoryLayoutTest` is currently only built in debug mode, which means that we don’t test it in CI, where we build swift-syntax in release mode. 

We should also enable it in release mode. The expected memory layout sizes might be different in release mode. In that case, we need to have two different `expected` dictionaries.

Pull request:
Remove `#if DEBUG` checks for `MemoryLayoutTests` and `SyntaxMemoryLayout`. 

Building and testing it on my local machine with RELEASE config passed without any changes. 

Resolves https://github.com/apple/swift-syntax/issues/2170

Patch:
diff --git a/Sources/SwiftSyntax/MemoryLayout.swift b/Sources/SwiftSyntax/MemoryLayout.swift
index f544e7f9622..501ec8ec220 100644
--- a/Sources/SwiftSyntax/MemoryLayout.swift
+++ b/Sources/SwiftSyntax/MemoryLayout.swift
@@ -10,7 +10,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#if DEBUG
 // See `MemoryLayoutTest.swift`.
 @_spi(Testing) public enum SyntaxMemoryLayout {
   public struct Value: Equatable {
@@ -41,4 +40,3 @@
     return result
   }
 }
-#endif
diff --git a/Sources/SwiftSyntax/Raw/RawSyntax.swift b/Sources/SwiftSyntax/Raw/RawSyntax.swift
index 9ff39983aa0..e83216ed8bf 100644
--- a/Sources/SwiftSyntax/Raw/RawSyntax.swift
+++ b/Sources/SwiftSyntax/Raw/RawSyntax.swift
@@ -944,7 +944,6 @@ extension RawSyntax: Identifiable {
   }
 }
 
-#if DEBUG
 /// See `SyntaxMemoryLayout`.
 var RawSyntaxDataMemoryLayouts: [String: SyntaxMemoryLayout.Value] = [
   "RawSyntaxData": .init(RawSyntaxData.self),
@@ -953,4 +952,3 @@ var RawSyntaxDataMemoryLayouts: [String: SyntaxMemoryLayout.Value] = [
   "RawSyntaxData.MaterializedToken": .init(RawSyntaxData.MaterializedToken.self),
   "RawSyntax?": .init(RawSyntax?.self),
 ]
-#endif
diff --git a/Sources/SwiftSyntax/Syntax.swift b/Sources/SwiftSyntax/Syntax.swift
index 312d31daade..42df8318698 100644
--- a/Sources/SwiftSyntax/Syntax.swift
+++ b/Sources/SwiftSyntax/Syntax.swift
@@ -308,7 +308,6 @@ extension Syntax {
 @available(*, unavailable, message: "use 'Syntax' instead")
 public struct SyntaxNode {}
 
-#if DEBUG
 /// See `SyntaxMemoryLayout`.
 var SyntaxMemoryLayouts: [String: SyntaxMemoryLayout.Value] = [
   "Syntax": .init(Syntax.self),
@@ -316,4 +315,3 @@ var SyntaxMemoryLayouts: [String: SyntaxMemoryLayout.Value] = [
   "Syntax.Info.Root": .init(Syntax.Info.Root.self),
   "Syntax.Info.NonRoot": .init(Syntax.Info.NonRoot.self),
 ]
-#endif


Test patch:
diff --git a/Tests/SwiftSyntaxTest/MemoryLayoutTest.swift b/Tests/SwiftSyntaxTest/MemoryLayoutTest.swift
index c8e7c64d121..af45e08f7fb 100644
--- a/Tests/SwiftSyntaxTest/MemoryLayoutTest.swift
+++ b/Tests/SwiftSyntaxTest/MemoryLayoutTest.swift
@@ -13,7 +13,6 @@
 @_spi(Testing) import SwiftSyntax
 import XCTest
 
-#if DEBUG
 final class MemoryLayoutTest: XCTestCase {
 
   func testMemoryLayouts() throws {
@@ -46,6 +45,4 @@ final class MemoryLayoutTest: XCTestCase {
       XCTAssertEqual(actualValue, exp.value, "Matching '\(exp.key)' values")
     }
   }
-
 }
-#endif
Repository: livebook-dev/kino (elixir)

Issue:
Make communication upstream use a pubsub
VegaLite does not need to track IDs, instead it will send a message to the group leader with a pubsub topic that is sent to Livebook.

Pull request:
Inspect non-utf8 binaries in Kino.DataTable
Closes https://github.com/livebook-dev/kino_db/issues/56.

Patch:
diff --git a/lib/kino/data_table.ex b/lib/kino/data_table.ex
index d02c443..0ed3a50 100644
--- a/lib/kino/data_table.ex
+++ b/lib/kino/data_table.ex
@@ -253,6 +253,11 @@ defmodule Kino.DataTable do
     end
   end
 
+  defp value_to_string(value) when is_binary(value) do
+    inspect_opts = Inspect.Opts.new([])
+    if String.printable?(value, inspect_opts.limit), do: value, else: inspect(value)
+  end
+
   defp value_to_string(value) do
     if mod = String.Chars.impl_for(value), do: mod.to_string(value), else: inspect(value)
   end


Test patch:
diff --git a/test/kino/data_table_test.exs b/test/kino/data_table_test.exs
index 68386b0..b5150fb 100644
--- a/test/kino/data_table_test.exs
+++ b/test/kino/data_table_test.exs
@@ -121,6 +121,21 @@ defmodule Kino.DataTableTest do
            } = data
   end
 
+  test "supports non-utf8 binary values" do
+    entries = [
+      binaries: [<<110, 120>>, <<200, 210>>]
+    ]
+
+    kino = Kino.DataTable.new(entries)
+    data = connect(kino)
+
+    assert %{
+             content: %{
+               data: [["nx"], ["<<200, 210>>"]]
+             }
+           } = data
+  end
+
   test "sends only relevant fields if user-specified keys are given" do
     kino = Kino.DataTable.new(@people_entries, keys: [:id])
     data = connect(kino)