String changed behaviour in Julia 1.1

#1

string(String[]) seems to be a no-op in Julia 1.1.
In 1.0.3. this worked as intended for me (see below).
Was this change intentional?

Note that string.(String[])!=string(String[]) in v1.0.3

It is breaking some code of mine (which expects that the “string” function returns a string)

julia> versioninfo()
Julia Version 1.0.3
Commit 099e826241 (2018-12-18 01:34 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
Environment:
  JULIA_BINDIR = C:\Julia-1.X\bin\
  JULIA_EDITOR = "C:\Program Files (x86)\Notepad++\notepad++.exe"
  JULIA_HOME = C:\Julia-1.X\bin\

julia> string(String[])
"String[]"

julia> string(Int32[])
"Int32[]"

julia> string(Float64[])
"Float64[]"
julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
  JULIA_BINDIR = C:\Julia-1.1.0\bin\
  JULIA_EDITOR = "C:\Program Files (x86)\Notepad++\notepad++.exe"
  JULIA_HOME = C:\Julia-1.1.0\bin\

julia> string(Int32[])
"Int32[]"

julia> string(String[])
0-element Array{String,1}
0 Likes

#2

Yep, the infamous https://github.com/JuliaLang/Pkg.jl/issues/1034, see also https://github.com/JuliaLang/julia/issues/30945#issuecomment-460065670.

1 Like

#3

Thanks.
I gather this will be fixed in 1.2 (or actually might already be fixed on nightly), correct?
Actually my tests on the windows nightly fail, while my tests on the linux nightly succeed.

0 Likes

#4

Yes, and 1.1.1.

Yes, as of https://github.com/JuliaLang/julia/pull/31116

1 Like