Skip to content

Commit 18e6dc1

Browse files
Merge pull request #25046 from fredrikekre/fe/workspace
remove workspace
2 parents 295b098 + f499b01 commit 18e6dc1

File tree

8 files changed

+6
-105
lines changed

8 files changed

+6
-105
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,9 @@ Deprecated or removed
732732
* `trues(A::AbstractArray)` and `falses(A::AbstractArray)` are deprecated in favor of
733733
`trues(size(A))` and `falses(size(A))` respectively ([#24595]).
734734

735+
* `workspace` is discontinued, check out [Revise.jl](https://github.com/timholy/Revise.jl)
736+
for an alternative workflow ([#25046]).
737+
735738
* `cumsum`, `cumprod`, `accumulate`, and their mutating versions now require a `dim`
736739
argument instead of defaulting to using the first dimension ([#24684]).
737740

base/exports.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,6 @@ export
938938
varinfo,
939939
versioninfo,
940940
which,
941-
workspace,
942941
@isdefined,
943942

944943
# loading source files

base/interactiveutil.jl

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -666,33 +666,6 @@ functionality instead.
666666
"""
667667
download(url, filename)
668668

669-
# workspace management
670-
671-
"""
672-
workspace()
673-
674-
Replace the top-level module (`Main`) with a new one, providing a clean workspace. The
675-
previous `Main` module is made available as `LastMain`.
676-
677-
If `Package` was previously loaded, `using Package` in the new `Main` will re-use the
678-
loaded copy. Run `reload("Package")` first to load a fresh copy.
679-
680-
This function should only be used interactively.
681-
"""
682-
function workspace()
683-
last = Core.Main # ensure to reference the current Main module
684-
b = Base # this module
685-
ccall(:jl_new_main_module, Any, ()) # make Core.Main a new baremodule
686-
m = Core.Main # now grab a handle to the new Main module
687-
ccall(:jl_add_standard_imports, Void, (Any,), m)
688-
eval(m, Expr(:toplevel,
689-
:(const Base = $b),
690-
:(const LastMain = $last),
691-
:(using Base.MainInclude)))
692-
empty!(package_locks)
693-
return m
694-
end
695-
696669
# testing
697670

698671
"""

base/reflection.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module_name(m::Module) = ccall(:jl_module_name, Ref{Symbol}, (Any,), m)
1818
"""
1919
module_parent(m::Module) -> Module
2020
21-
Get a module's enclosing `Module`. `Main` is its own parent, as is `LastMain` after `workspace()`.
21+
Get a module's enclosing `Module`. `Main` is its own parent.
2222
2323
# Examples
2424
```jldoctest

doc/src/manual/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ code to help the user avoid other wrong-behavior situations:
355355
emitted when the incremental precompile flag is set.
356356
2. `global const` statements from local scope after `__init__()` has been started (see issue #12010
357357
for plans to add an error for this)
358-
3. Replacing a module (or calling [`workspace()`](@ref)) is a runtime error while doing an incremental precompile.
358+
3. Replacing a module is a runtime error while doing an incremental precompile.
359359

360360
A few other points to be aware of:
361361

doc/src/stdlib/base.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ Base.methods
4848
Base.methodswith
4949
Base.@show
5050
Base.versioninfo
51-
Base.workspace
5251
ans
5352
```
5453

test/choosetests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function choosetests(choices = [])
4848
"replutil", "sets", "goto", "llvmcall", "llvmcall2", "grisu",
4949
"nullable", "meta", "stacktraces", "libgit2", "docs",
5050
"markdown", "serialize", "misc", "threads",
51-
"enums", "cmdlineargs", "i18n", "workspace", "libdl", "int",
51+
"enums", "cmdlineargs", "i18n", "libdl", "int",
5252
"checked", "bitset", "floatfuncs", "compile", "distributed", "inline",
5353
"boundscheck", "error", "ambiguous", "cartesian", "asmvariant", "osutils",
5454
"channels", "iostream", "specificity", "codegen", "codevalidation",

test/workspace.jl

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)