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

move InteractiveUtils to stdlib #25780

Merged
merged 1 commit into from
Jan 29, 2018
Merged

move InteractiveUtils to stdlib #25780

merged 1 commit into from
Jan 29, 2018

Conversation

JeffBezanson
Copy link
Member

@JeffBezanson JeffBezanson commented Jan 27, 2018

I kept dump and which for now.

Also deprecated which(::Symbol), since we have generally been removing functions that default to looking in Main.

Moved a few things to more logical places. _check_bitarray_consistency is now in Test. All the code for cpu_info is in Sys. Not sure what to do with Base.runtests; kept it for now. download obviously has non-interactive uses, so it stays. clipboard could go either way.

Closes #25751

@JeffBezanson JeffBezanson added deprecation This change introduces or involves a deprecation excision Removal of code from Base or the repository stdlib Julia's standard library labels Jan 27, 2018
base/client.jl Outdated
@@ -419,6 +419,7 @@ function _start()
end

if repl
eval(Main, :(using InteractiveUtils))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to load these if the -i flag is set? Then it will automatically work in IJulia and other things that use julia -i.

@JeffBezanson JeffBezanson force-pushed the jb/interactiveutils branch 2 times, most recently from e7e8d4e to 361f4af Compare January 28, 2018 02:00
@KristofferC
Copy link
Member

This should remove the last usage of Pkg in Base.

@JeffBezanson JeffBezanson force-pushed the jb/interactiveutils branch 2 times, most recently from 41eb402 to f34a762 Compare January 28, 2018 20:16
@JeffBezanson JeffBezanson merged commit 5022420 into master Jan 29, 2018
@JeffBezanson JeffBezanson deleted the jb/interactiveutils branch January 29, 2018 03:24
@maleadt
Copy link
Member

maleadt commented Jan 29, 2018

Is _dump_function really considered an interactive utility? It's also the main entry-point into the compiler as used by CUDAnative and the likes. Maybe we need a better API that can be part of Base then?

@JeffBezanson
Copy link
Member Author

Ok, if you just need _dump_function, that can be moved back. But I agree there could be a better API --- is there some way it could be done without printing and re-parsing?

Base.DATAROOTDIR, "julia", "test", "runtests.jl")) $tests`, ENV2))
catch
buf = PipeBuffer()
versioninfo(buf)
Copy link
Member

@fredrikekre fredrikekre Jan 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now gives:

WARNING: Base.versioninfo is deprecated: it has been moved to the standard library package `InteractiveUtils`.
Add a `using InteractiveUtils` to your imports..
 in module Base

when Base.runtests fail.
Edit: Not on only on failure, apparently always.

@maleadt
Copy link
Member

maleadt commented Jan 31, 2018

Ok, if you just need _dump_function, that can be moved back. But I agree there could be a better API --- is there some way it could be done without printing and re-parsing?

Actually, there is already jl_get_llvmf_defn, I was only using _dump_function for 0.6 compatibility.
Let's use that directly; _dump_function and the likes can stay in InteractiveUtils then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation This change introduces or involves a deprecation excision Removal of code from Base or the repository stdlib Julia's standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants