Skip to content

Commit 7c40a71

Browse files
authored
move to a simpler versioning policy for the Compiler.jl stdlib (#57520)
This commit adjusts /Compiler/Project.toml and adds a new /Compiler/README.md based on the new versioning policy for the Compiler.jl stdlib. Regarding the new versioning policy and the latest way to use the Compiler.jl stdlib, please refer to this comment[^1] and the newly added READMEs (`JuliaLang/julia/Compiler/README.md`[^2] and and `JuliaLang/BaseCompiler.jl/README.md`[^3]). [^1]: #57520 (comment) [^2]: https://github.com/JuliaLang/julia/blob/a8f3e4d0603692ac79700890d3e8d35e904e000e/Compiler/README.md [^3]: https://github.com/JuliaLang/BaseCompiler.jl
1 parent 92cdcba commit 7c40a71

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

Compiler/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Compiler"
22
uuid = "807dbc54-b67e-4c79-8afb-eafe4df6f2e1"
3-
version = "0.0.3"
3+
version = "0.0.0"
44

55
[compat]
66
julia = "1.10"

Compiler/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# The `Compiler` module
2+
3+
This directory maintains the implementation of the Julia compiler.
4+
5+
Through a bootstrapping process, it is bundled into the Julia runtime as `Base.Compiler`.
6+
7+
You can also use this `Compiler` module as the `Compiler` standard library by following the steps below.
8+
9+
## How to use
10+
11+
To utilize this `Compiler.jl` standard library, you need to declare it as a dependency in
12+
your `Project.toml` as follows:
13+
> Project.toml
14+
```toml
15+
[deps]
16+
Compiler = "807dbc54-b67e-4c79-8afb-eafe4df6f2e1"
17+
18+
[compat]
19+
Compiler = "0"
20+
```
21+
22+
With the setup above, [the special placeholder version (v0.0.0)](https://github.com/JuliaLang/BaseCompiler.jl)
23+
will be installed by default.[^1]
24+
25+
[^1]: Currently, only version v0.0.0 is registered in the [General](https://github.com/JuliaRegistries/General) registry.
26+
27+
If needed, you can switch to a custom implementation of the `Compiler` module by running
28+
```julia-repl
29+
pkg> dev /path/to/Compiler.jl # to use a local implementation
30+
```
31+
or
32+
```julia-repl
33+
pkg> add https://url/of/Compiler/branch # to use a remote implementation
34+
```
35+
This feature is particularly useful for developing or experimenting with alternative compiler implementations.
36+
37+
> [!note]
38+
> The Compiler.jl standard library is available starting from Julia v1.10.
39+
> However, switching to a custom compiler implementation is supported only from
40+
> Julia v1.12 onwards.
41+
42+
> [!warning]
43+
> When using a custom, non-`Base` version of `Compiler` implementation, it may be necessary
44+
> to run `InteractiveUtils.@activate Compiler` to ensure proper functionality of certain
45+
> reflection utilities.

0 commit comments

Comments
 (0)