PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: hylo-lang/hylo (swift)

Issue:
Structures without elements produce error in init function
```
public type Foo {
  public init() { }
}
```
Results in
```
error: set parameter not initialized before function returns
```

Pull request:
Fixes: https://github.com/hylo-lang/hylo/issues/997

Alternative approach to https://github.com/hylo-lang/hylo/pull/1014

Patch:
diff --git a/Sources/IR/Emitter.swift b/Sources/IR/Emitter.swift
index bf746b5eb..613689402 100644
--- a/Sources/IR/Emitter.swift
+++ b/Sources/IR/Emitter.swift
@@ -316,6 +316,14 @@ struct Emitter {
     insertionPoint = .end(of: entry)
     let bodyFrame = Frame(locals: locals)
     let returnSite = pushing(bodyFrame, { $0.lowerStatements($0.ast[d].body!, expecting: .void) })
+
+    let receiverLayout = AbstractTypeLayout(of: program[d].receiver.type, definedIn: program)
+
+    // If the object is empty, simply mark it initialized.
+    if receiverLayout.properties.isEmpty {
+      let receiver = entry.parameter(0)
+      insert(module.makeMarkState(receiver, initialized: true, at: ast[d].site))
+    }
     insert(module.makeReturn(at: returnSite))
   }
 


Test patch:
diff --git a/Tests/HyloTests/TestCases/Lowering/EmptyStruct.hylo b/Tests/HyloTests/TestCases/Lowering/EmptyStruct.hylo
new file mode 100644
index 000000000..73d82fb9c
--- /dev/null
+++ b/Tests/HyloTests/TestCases/Lowering/EmptyStruct.hylo
@@ -0,0 +1,5 @@
+//- lowerToFinishedIR expecting: success
+
+public type Foo {
+  public init() { }
+}
Repository: livebook-dev/kino (elixir)

Issue:
Warning when code inside remote execution cell contains a string using " "
When I run that code inside the remote execution smart cell:

```elixir
"some string"
```

Elixir emits a warning saying:

```
warning: using \" to escape the closing of an uppercase sigil is deprecated, 
please use another delimiter or a lowercase sigil instead
```

Here's the screenshot:

![CleanShot 2024-08-16 at 15 23 23](https://github.com/user-attachments/assets/74f92c78-3536-4b64-9287-69cc5ddf6088)

And here's a screenshot of the code generated by the smart cell:

![CleanShot 2024-08-16 at 15 25 48](https://github.com/user-attachments/assets/d46177c6-271d-4b33-9f87-42378756e85b)


I think that's because of [a deprecation introduced in Elixir 1.17](https://github.com/elixir-lang/elixir/commit/dab3d229930b1e0379a35d7f56697aac6bf177a6).

I think we can fix the deprecation.



Pull request:
Use triple quote when remote cell content contains a quote
Closes #464.

We could use a different delimiter, but we would checks to find one that is not present in the string, so I think it's better to just use the triple delimiter.

Patch:
diff --git a/lib/kino/remote_execution_cell.ex b/lib/kino/remote_execution_cell.ex
index 067bc74..cf71501 100644
--- a/lib/kino/remote_execution_cell.ex
+++ b/lib/kino/remote_execution_cell.ex
@@ -139,7 +139,7 @@ defmodule Kino.RemoteExecutionCell do
 
   defp quoted_code(code) do
     {delimiter, code} =
-      if String.contains?(code, "\n") do
+      if String.contains?(code, ["\n", ~s/"/]) do
         {~s["""], code <> "\n"}
       else
         {~s["], code}


Test patch:
diff --git a/test/kino/remote_execution_cell_test.exs b/test/kino/remote_execution_cell_test.exs
index 71b554c..4d5616a 100644
--- a/test/kino/remote_execution_cell_test.exs
+++ b/test/kino/remote_execution_cell_test.exs
@@ -138,7 +138,14 @@ defmodule Kino.RemoteExecutionCellTest do
                require Kino.RPC
                node = :name@node
                Node.set_cookie(node, :"node-cookie")
-               Kino.RPC.eval_string(node, ~S"\"Number #{1}\"", file: __ENV__.file)
+
+               Kino.RPC.eval_string(
+                 node,
+                 ~S"""
+                 "Number #{1}"
+                 """,
+                 file: __ENV__.file
+               )
                '''
                |> String.replace_trailing("\n", "")