I think I may have found a bug, but I’ve never made a issue on an open source project before, and I wanted a sanity check to see if it is worth creating.
"Test String" function somefunc1(x,y) println(x, y) end
function somefunc1(x) somefunc(x, x) end
Then repeatedly running cell 1 results in a duplicated docstring. It also occurs if the docstring is on the second function.
I was writing a function that built a matrix depending on a passed x and y dimension, but I wanted a version that could take a single dimension, and build a square matrix, and stumbled across this bug.
This can be written in alternative ways to avoid the duplication:
begin function somefunc2(x) somefunc2(x,x) end "Test String" function somefunc2(x,y) println(x, y) end end
"Test String" function somefunc3(x, y=x) println(x,y) end
In testing out these combinations, I realized that the second option using the default parameter is far more succinct than my original method that resulted in the docstring duplication, so I could just change it and not have a problem.
However, even if the two cell function definition is not the best way to implement the function, the docstring shouldn’t get duplicated. There have been previous issues with docstring duplication that got fixed in March, for example.
This is my first real interaction with the Julia community besides just reading posts, so I wanted to be careful and get some of your opinions. Should this be opened as an issue in Pluto.jl?