Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate Array(shape...)-like constructors to Array(uninitialized, shape...) #24781

Merged
merged 4 commits into from
Nov 30, 2017

Conversation

Sacha0
Copy link
Member

@Sacha0 Sacha0 commented Nov 25, 2017

This pull request deprecates uninitialized-Array constructors of the form Array[{T,N}](shape...) in favor of Array[{T,N}](uninitialized, shape...) equivalents. For background, please see #24595. Best!

(This pull request should not pass CI till the remaining Array(shape...) call replacement pull requests merge, hence the WIP.)

@Sacha0 Sacha0 added domain:arrays [a, r, r, a, y, s] kind:deprecation This change introduces or involves a deprecation labels Nov 25, 2017
@fredrikekre
Copy link
Member

error during bootstrap:
LoadError(at "coreimg.jl" line 3: LoadError(at "bitarray.jl" line 1053: MethodError(f=typeof(Core.Inference.convert)(), args=(Array{UInt64, 1}, 0), world=0x00000000000008fa)))
rec_backtrace at /home/travis/build/JuliaLang/julia/src/stackwalk.c:94
record_backtrace at /home/travis/build/JuliaLang/julia/src/task.c:246
jl_throw at /home/travis/build/JuliaLang/julia/src/task.c:577
jl_method_error_bare at /home/travis/build/JuliaLang/julia/src/gf.c:1507
jl_method_error at /home/travis/build/JuliaLang/julia/src/gf.c:1525
jl_lookup_generic_ at /home/travis/build/JuliaLang/julia/src/gf.c:1987 [inlined]
jl_apply_generic at /home/travis/build/JuliaLang/julia/src/gf.c:2007

@Sacha0
Copy link
Member Author

Sacha0 commented Nov 26, 2017

Comprehension lowering required updating, and a similar(arraytype, shape...) method as well. Those updates fix bootstrap/build locally. What say you now, CI?

@Sacha0
Copy link
Member Author

Sacha0 commented Nov 26, 2017

Thoughts on the similar(funcortype, inds...) = funcortype(inds...) -> ... = funcortype(uninitialized, inds...) change, @timholy? Thanks!

@Sacha0 Sacha0 force-pushed the deparrshape branch 2 times, most recently from c99a59a to eb7c2d6 Compare November 28, 2017 21:43
@Sacha0
Copy link
Member Author

Sacha0 commented Nov 28, 2017

Caught another necessary lowering change, fixed a few additional Array(shape...)-like calls that slipped by previously, switched to a more conservative similar(typeorfunc, shape) change, and polished the deprecations a bit. What say you now, CI?

Pending CI this pull request should now be in shape. (Though merging #24785 will introduce a minor conflict here.) So absent objections or requests for time, I plan to merge these changes tomorrow. Best!

@Sacha0 Sacha0 changed the title [WIP] deprecate Array(shape...)-like constructors to Array(uninitialized, shape...) deprecate Array(shape...)-like constructors to Array(uninitialized, shape...) Nov 28, 2017
@Sacha0 Sacha0 force-pushed the deparrshape branch 2 times, most recently from 053e6e2 to 04f5d91 Compare November 29, 2017 04:10
@Sacha0 Sacha0 merged commit 171005c into JuliaLang:master Nov 30, 2017
@Sacha0 Sacha0 deleted the deparrshape branch November 30, 2017 04:31
@Sacha0
Copy link
Member Author

Sacha0 commented Nov 30, 2017

Thanks all! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:arrays [a, r, r, a, y, s] kind:deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants