Keno / Keno/DeprecationBotTest

Incorrect bot action in Keno/DeprecationBotTest

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

@Keno has indicated an incorrect bot action in https://github.com/Keno/DeprecationBotTest/pull/6
The relevant snippets are shown below:

```diff
@@ -1,28 +1,24 @@
module DeprecationBotTest

-function foobar{T}(x, y::T)
+function foobar(x, y::T) where T
println(x, y)
end

if !(isdefined(Core, :String) && isdefined(Core, :AbstractString))
- function jlconvert(T::Union{Type{Compat.ASCIIString},Type{Compat.UTF8String}}, ::JldFile, ptr::Ptr)
+ function jlconvert(T::Union{Type{String},Type{String}}, ::JldFile, ptr::Ptr)
strptr = unsafe_load(convert(Ptr{Ptr{UInt8}}, ptr))
n = Int(ccall(:strlen, Csize_t, (Ptr{UInt8},), strptr))
T(unsafe_wrap(Array, strptr, n, true))
end
end

-if VERSION >= v"0.1.0"
- _foo(x) = foo(x)
-else
- _foo(x) = foo(x)
-end
+_foo(x) = foo(x)
```
```diff
@@ -1,28 +1,24 @@
module DeprecationBotTest

-function foobar{T}(x, y::T)
+function foobar(x, y::T) where T
println(x, y)
end

if !(isdefined(Core, :String) && isdefined(Core, :AbstractString))
- function jlconvert(T::Union{Type{Compat.ASCIIString},Type{Compat.UTF8String}}, ::JldFile, ptr::Ptr)
+ function jlconvert(T::Union{Type{String},Type{String}}, ::JldFile, ptr::Ptr)
strptr = unsafe_load(convert(Ptr{Ptr{UInt8}}, ptr))
n = Int(ccall(:strlen, Csize_t, (Ptr{UInt8},), strptr))
T(unsafe_wrap(Array, strptr, n, true))
end
end

-if VERSION >= v"0.1.0"
- _foo(x) = foo(x)
-else
- _foo(x) = foo(x)
-end
+_foo(x) = foo(x)

bar(x) = _foo(x)

-function foobar{T}(a,
- b::T,
- c::T)
+function foobar(a,
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by examining the incorrect bot action reported against pull request #6 and compare both diff snippets in this issue. Trace the GitHub integration entry point that produced the transformation, then reproduce the action and determine what output should be considered correct. Done means the bot no longer makes the reported incorrect changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, julia
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.