PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: baianat/vee-validate (js)

Issue:
Infinite Update Loop for Unexpected Validation Rule Parameter
**Versions**

- vee-validate: 2.1.7
- vue: 2.6.6

**Describe the bug**
When using between validation rule with unexpected parameter (e.g.: `NaN`) and accessing `this.errors` VeeValidate gets the Vue app in an infinite loop and freezes the browser.

Generally I wouldn't pass `NaN` directly, but for more complex scenarios where the lower or upper bounds for a between rule come from a computed property and there is a bug when calculating this value then the parameter might be `NaN`. This happened to me as the lower bound was determined using `Math.max` and I didn't expand the array, i.e.: `Math.max([1, 2, 3])` returns `NaN` while `Math.max(...[1, 2, 3])` returns `3`. This can be easy to miss.

**To reproduce**
Steps to reproduce the behavior:
1. Define a form with an input with between rule (use object notation and pass `NaN` as the first parameter)
2. Register a method for handling the submit of the form and access `this.errors`
3. Submit the form
4. The browser freezes

**Expected behavior**
If a validation rule receives unexpected parameters it should end the validation promise in an error state so that I can chain a `catch` and log the error.

**Demo link**
https://jsfiddle.net/tjuzcmdh/2/ (check the console window)
The VeeValidate version used in the sample above is 2.1.6, I've tested 2.1.7 as well and the same problem happens with the latest version as well.

**Desktop:**
 - OS: Windows 10
 - Browser Chrome
 - Version 72.0.3626.109

Pull request:
fix: added NaN check for directive render loops closes #1873
closes #1873

Patch:
diff --git a/src/utils/index.js b/src/utils/index.js
index 10b4fc0c..a90106b9 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -17,6 +17,15 @@ export const isDateInput = (el: HTMLInputElement) => {
  */
 export const getDataAttribute = (el: HTMLElement, name: string) => el.getAttribute(`data-vv-${name}`);
 
+export const isNaN = (value: any) => {
+  if ('isNaN' in Number) {
+    return Number.isNaN(value);
+  }
+
+  // eslint-disable-next-line
+  return value === value;
+};
+
 /**
  * Checks if the values are either null or undefined.
  */
@@ -76,6 +85,10 @@ export const isEqual = (lhs: any, rhs: any): boolean => {
     });
   }
 
+  if (isNaN(lhs) && isNaN(rhs)) {
+    return true;
+  }
+
   return lhs === rhs;
 };
 


Test patch:
diff --git a/tests/unit/utils.js b/tests/unit/utils.js
index 50306751..2d79d7b4 100644
--- a/tests/unit/utils.js
+++ b/tests/unit/utils.js
@@ -372,6 +372,8 @@ test('compares two values', () => {
   expect(utils.isEqual([1, 2, 3], [1, 2, 3])).toBe(true);
   expect(utils.isEqual([1, 2, 3], [1, 2])).toBe(false);
   expect(utils.isEqual([1, 2, 3], [1, 2, '3'])).toBe(false);
+
+  expect(utils.isEqual(NaN, NaN)).toBe(true);
 });
 
 test('formats file sizes', () => {
Repository: hyrodium/BasicBSpline.jl (julia)

Issue:
missing constructor `BSplineSpace`
```julia
julia> using BasicBSpline

julia> BSplineSpace{3}(knotvector"111111111111")
BSplineSpace{3, Int64, KnotVector{Int64}}(KnotVector([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]))

julia> BSplineSpace{3, Int64, KnotVector{Int64}}(KnotVector([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]))
ERROR: MethodError: no method matching BSplineSpace{3, Int64, KnotVector{Int64}}(::KnotVector{Int64})

Closest candidates are:
  BSplineSpace{p, T, K}(::BSplineSpace{p, T} where T<:Real) where {p, T, K}
```

Pull request:
This PR fixes https://github.com/hyrodium/BasicBSpline.jl/issues/335.

Patch:
diff --git a/src/_BSplineSpace.jl b/src/_BSplineSpace.jl
index cbb5c20ba..08aff29f9 100644
--- a/src/_BSplineSpace.jl
+++ b/src/_BSplineSpace.jl
@@ -54,6 +54,9 @@ end
 function BSplineSpace{p,T,K}(P::BSplineSpace{p}) where {p,T,K}
     return BSplineSpace{p,T}(K(knotvector(P)))
 end
+function BSplineSpace{p,T,K}(k::AbstractKnotVector) where {p,T,K}
+    return BSplineSpace{p,T}(K(k))
+end
 
 # Broadcast like a scalar
 Base.Broadcast.broadcastable(P::BSplineSpace) = Ref(P)


Test patch:
diff --git a/test/test_BSplineSpace.jl b/test/test_BSplineSpace.jl
index 2402a0b4e..aec0451c6 100644
--- a/test/test_BSplineSpace.jl
+++ b/test/test_BSplineSpace.jl
@@ -6,9 +6,10 @@
         P4 = BSplineSpace{2,Real}(P1)
         P5 = BSplineSpace{2,Float64}(P1)
         P6 = BSplineSpace{2,Float64}(KnotVector(1:8))
+        P7 = BSplineSpace{2,Float64,KnotVector{Float64}}(KnotVector(1:8))
         @test P1 == P2 == P3 == P4 == P5 == bsplinespace(P1) == bsplinespace(P2) == bsplinespace(P3) == bsplinespace(P4) == bsplinespace(P5)
-        @test P5 == P6
-        @test typeof(P5) === typeof(P6)
+        @test P5 == P6 == P7
+        @test typeof(P5) === typeof(P6) === typeof(P7)
         @test P1 isa BSplineSpace{2,Int}
         @test P2 isa BSplineSpace{2,Int}
         @test P3 isa BSplineSpace{2,Int}
Repository: Roger-luo/Configurations.jl (julia)

Issue:
@static if inside @option
While trying to port Pluto to Configurations.jl, I found this:
```julia
julia> using Configurations

julia> f() = 123
f (generic function with 1 method)

julia> @option struct A
           x=f()
       end

julia> @option struct B
           x=1
           @static if true
               y=f()
           end
       end

julia> A()
A(;
)

julia> A(1)
A(;
    x = 1,
)

julia> B()
ERROR: MethodError: no method matching B(::Int64)
Closest candidates are:
  B(; x) at none:0
Stacktrace:
 [1] B(; x::Int64)
   @ Main ./none:0
 [2] B()
   @ Main ./none:0
 [3] top-level scope
   @ REPL[9]:1

julia> B(1,2)
ERROR: MethodError: no method matching B(::Int64, ::Int64)
Stacktrace:
 [1] top-level scope
   @ REPL[5]:1

```

We use `@static` here: https://github.com/fonsp/Pluto.jl/blob/main/src/Configuration.jl#L84

Pull request:
fix #39  need Expronicon 0.6.6

Patch:
diff --git a/src/codegen.jl b/src/codegen.jl
index cf768b3..98bcb64 100644
--- a/src/codegen.jl
+++ b/src/codegen.jl
@@ -71,14 +71,15 @@ OptionD(;
 ```
 """
 macro option(ex)
-    esc(option_m(ex))
+    esc(option_m(__module__, ex))
 end
 
 macro option(alias::String, ex)
-    esc(option_m(ex, alias))
+    esc(option_m(__module__, ex, alias))
 end
 
-function option_m(ex, type_alias=nothing)
+function option_m(mod::Module, ex, type_alias=nothing)
+    ex = macroexpand(mod, ex)
     def = JLKwStruct(ex, type_alias)
     return codegen_option_type(def)
 end


Test patch:
diff --git a/test/runtests.jl b/test/runtests.jl
index 65cb4e1..6071832 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -405,6 +405,17 @@ end
     @test from_dict(UnionToDict, d) == x
 end
 
+@option struct MacroExpand
+    x=1
+    @static if true
+        y=2
+    end
+end
+
+@testset "macroexpand (#39)" begin
+    @test fieldnames(MacroExpand) == (:x, :y)
+end
+
 @option struct DefaultFunction
     a::Float64
     b::Float64 = sin(a)