Keno / Keno/DeprecationBotTest

Incorrect bot action in Keno/DeprecationBotTest

Open
#11 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/134331964
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 opening pull request 134331964 and comparing the shown Julia diffs with the bot action reported in this issue. Then locate the GitHub integration or bot configuration in the repository, reproduce the action, and establish the expected transformation so the incorrect changes are no longer produced.

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.