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

remove workspace #25046

Merged
merged 1 commit into from
Dec 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,9 @@ Deprecated or removed
* `trues(A::AbstractArray)` and `falses(A::AbstractArray)` are deprecated in favor of
`trues(size(A))` and `falses(size(A))` respectively ([#24595]).

* `workspace` is discontinued, check out [Revise.jl](https://github.com/timholy/Revise.jl)
for an alternative workflow ([#25046]).
Copy link
Member

Choose a reason for hiding this comment

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

😱 Revise.jl still doesn't work on FreeBSD

Copy link
Member

Choose a reason for hiding this comment

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

issue filed.
timholy/Revise.jl#66

Copy link
Contributor

Choose a reason for hiding this comment

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

@StefanKarpinski shouldn't this needed a deprecation warning too, not just deleting it?

Else people will just get an UndefVarError, with no idea that they should be checking out Revise.


* `cumsum`, `cumprod`, `accumulate`, and their mutating versions now require a `dim`
argument instead of defaulting to using the first dimension ([#24684]).

Expand Down
1 change: 0 additions & 1 deletion base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,6 @@ export
varinfo,
versioninfo,
which,
workspace,
@isdefined,

# loading source files
Expand Down
27 changes: 0 additions & 27 deletions base/interactiveutil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -666,33 +666,6 @@ functionality instead.
"""
download(url, filename)

# workspace management

"""
workspace()

Replace the top-level module (`Main`) with a new one, providing a clean workspace. The
previous `Main` module is made available as `LastMain`.

If `Package` was previously loaded, `using Package` in the new `Main` will re-use the
loaded copy. Run `reload("Package")` first to load a fresh copy.

This function should only be used interactively.
"""
function workspace()
last = Core.Main # ensure to reference the current Main module
b = Base # this module
ccall(:jl_new_main_module, Any, ()) # make Core.Main a new baremodule
m = Core.Main # now grab a handle to the new Main module
ccall(:jl_add_standard_imports, Void, (Any,), m)
eval(m, Expr(:toplevel,
:(const Base = $b),
:(const LastMain = $last),
:(using Base.MainInclude)))
empty!(package_locks)
return m
end

# testing

"""
Expand Down
2 changes: 1 addition & 1 deletion base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module_name(m::Module) = ccall(:jl_module_name, Ref{Symbol}, (Any,), m)
"""
module_parent(m::Module) -> Module

Get a module's enclosing `Module`. `Main` is its own parent, as is `LastMain` after `workspace()`.
Get a module's enclosing `Module`. `Main` is its own parent.

# Examples
```jldoctest
Expand Down
2 changes: 1 addition & 1 deletion doc/src/manual/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ code to help the user avoid other wrong-behavior situations:
emitted when the incremental precompile flag is set.
2. `global const` statements from local scope after `__init__()` has been started (see issue #12010
for plans to add an error for this)
3. Replacing a module (or calling [`workspace()`](@ref)) is a runtime error while doing an incremental precompile.
3. Replacing a module is a runtime error while doing an incremental precompile.

A few other points to be aware of:

Expand Down
1 change: 0 additions & 1 deletion doc/src/stdlib/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Base.methods
Base.methodswith
Base.@show
Base.versioninfo
Base.workspace
ans
```

Expand Down
2 changes: 1 addition & 1 deletion test/choosetests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function choosetests(choices = [])
"replutil", "sets", "goto", "llvmcall", "llvmcall2", "grisu",
"nullable", "meta", "stacktraces", "libgit2", "docs",
"markdown", "serialize", "misc", "threads",
"enums", "cmdlineargs", "i18n", "workspace", "libdl", "int",
"enums", "cmdlineargs", "i18n", "libdl", "int",
"checked", "bitset", "floatfuncs", "compile", "distributed", "inline",
"boundscheck", "error", "ambiguous", "cartesian", "asmvariant", "osutils",
"channels", "iostream", "specificity", "codegen", "codevalidation",
Expand Down
73 changes: 0 additions & 73 deletions test/workspace.jl

This file was deleted.