Sunset RLS

This commit is contained in:
Eric Huss 2022-08-20 21:19:43 -07:00
parent 1e978a3627
commit 4a7e2fbb7b
27 changed files with 162 additions and 593 deletions

View File

@ -431,7 +431,7 @@ jobs:
env: env:
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=aarch64-pc-windows-msvc --enable-full-tools --enable-profiler" RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
SCRIPT: python x.py dist SCRIPT: python x.py dist
DIST_REQUIRE_ALL_TOOLS: 0 DIST_REQUIRE_ALL_TOOLS: 1
WINDOWS_SDK_20348_HACK: 1 WINDOWS_SDK_20348_HACK: 1
os: windows-latest-xl os: windows-latest-xl
- name: dist-i686-mingw - name: dist-i686-mingw

3
.gitmodules vendored
View File

@ -13,9 +13,6 @@
[submodule "src/doc/book"] [submodule "src/doc/book"]
path = src/doc/book path = src/doc/book
url = https://github.com/rust-lang/book.git url = https://github.com/rust-lang/book.git
[submodule "src/tools/rls"]
path = src/tools/rls
url = https://github.com/rust-lang/rls.git
[submodule "src/tools/miri"] [submodule "src/tools/miri"]
path = src/tools/miri path = src/tools/miri
url = https://github.com/rust-lang/miri.git url = https://github.com/rust-lang/miri.git

View File

@ -79,7 +79,7 @@ dependencies = [
"maplit", "maplit",
"once_cell", "once_cell",
"tendril", "tendril",
"url 2.2.2", "url",
] ]
[[package]] [[package]]
@ -359,7 +359,7 @@ dependencies = [
"openssl", "openssl",
"os_info", "os_info",
"pathdiff", "pathdiff",
"percent-encoding 2.1.0", "percent-encoding",
"pretty_env_logger", "pretty_env_logger",
"rustc-workspace-hack", "rustc-workspace-hack",
"rustfix", "rustfix",
@ -376,7 +376,7 @@ dependencies = [
"toml_edit", "toml_edit",
"unicode-width", "unicode-width",
"unicode-xid", "unicode-xid",
"url 2.2.2", "url",
"walkdir", "walkdir",
"winapi", "winapi",
] ]
@ -462,7 +462,7 @@ dependencies = [
"tar", "tar",
"termcolor", "termcolor",
"toml_edit", "toml_edit",
"url 2.2.2", "url",
"winapi", "winapi",
] ]
@ -665,7 +665,7 @@ dependencies = [
"compiletest_rs", "compiletest_rs",
"derive-new", "derive-new",
"filetime", "filetime",
"futures 0.3.19", "futures",
"if_chain", "if_chain",
"itertools", "itertools",
"parking_lot 0.12.1", "parking_lot 0.12.1",
@ -673,7 +673,7 @@ dependencies = [
"regex", "regex",
"rustc-semver", "rustc-semver",
"rustc-workspace-hack", "rustc-workspace-hack",
"rustc_tools_util 0.2.0", "rustc_tools_util",
"semver", "semver",
"serde", "serde",
"syn", "syn",
@ -718,7 +718,7 @@ dependencies = [
"toml", "toml",
"unicode-normalization", "unicode-normalization",
"unicode-script", "unicode-script",
"url 2.2.2", "url",
] ]
[[package]] [[package]]
@ -921,10 +921,10 @@ version = "0.34.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"curl", "curl",
"percent-encoding 2.1.0", "percent-encoding",
"serde", "serde",
"serde_json", "serde_json",
"url 2.2.2", "url",
] ]
[[package]] [[package]]
@ -1093,17 +1093,6 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "derive_more"
version = "0.99.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "298998b1cf6b5b2c8a7b023dfd45821825ce3ba8a8af55c921a0e734e4653f76"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "diff" name = "diff"
version = "0.1.13" version = "0.1.13"
@ -1415,7 +1404,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
dependencies = [ dependencies = [
"matches", "matches",
"percent-encoding 2.1.0", "percent-encoding",
] ]
[[package]] [[package]]
@ -1440,12 +1429,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674" checksum = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674"
[[package]]
name = "fst"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d79238883cf0307100b90aba4a755d8051a3182305dfe7f649a1e9dc0517006f"
[[package]] [[package]]
name = "futf" name = "futf"
version = "0.1.5" version = "0.1.5"
@ -1456,12 +1439,6 @@ dependencies = [
"new_debug_unreachable", "new_debug_unreachable",
] ]
[[package]]
name = "futures"
version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678"
[[package]] [[package]]
name = "futures" name = "futures"
version = "0.3.19" version = "0.3.19"
@ -1502,7 +1479,6 @@ dependencies = [
"futures-core", "futures-core",
"futures-task", "futures-task",
"futures-util", "futures-util",
"num_cpus",
] ]
[[package]] [[package]]
@ -1540,7 +1516,6 @@ version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164" checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164"
dependencies = [ dependencies = [
"futures 0.1.31",
"futures-channel", "futures-channel",
"futures-core", "futures-core",
"futures-io", "futures-io",
@ -1661,7 +1636,7 @@ dependencies = [
"log", "log",
"openssl-probe", "openssl-probe",
"openssl-sys", "openssl-sys",
"url 2.2.2", "url",
] ]
[[package]] [[package]]
@ -1673,7 +1648,7 @@ dependencies = [
"curl", "curl",
"git2", "git2",
"log", "log",
"url 2.2.2", "url",
] ]
[[package]] [[package]]
@ -1814,17 +1789,6 @@ version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a" checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a"
[[package]]
name = "idna"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e"
dependencies = [
"matches",
"unicode-bidi",
"unicode-normalization",
]
[[package]] [[package]]
name = "idna" name = "idna"
version = "0.2.0" version = "0.2.0"
@ -1979,12 +1943,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "json"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "078e285eafdfb6c4b434e0d31e8cfcb5115b651496faca5749b88fafd4f23bfd"
[[package]] [[package]]
name = "jsondocck" name = "jsondocck"
version = "0.1.0" version = "0.1.0"
@ -2011,110 +1969,6 @@ dependencies = [
"serde_json", "serde_json",
] ]
[[package]]
name = "jsonrpc-client-transports"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a"
dependencies = [
"derive_more",
"futures 0.3.19",
"jsonrpc-core",
"jsonrpc-pubsub",
"jsonrpc-server-utils",
"log",
"parity-tokio-ipc",
"serde",
"serde_json",
"tokio",
"url 1.7.2",
]
[[package]]
name = "jsonrpc-core"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb"
dependencies = [
"futures 0.3.19",
"futures-executor",
"futures-util",
"log",
"serde",
"serde_derive",
"serde_json",
]
[[package]]
name = "jsonrpc-core-client"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0"
dependencies = [
"futures 0.3.19",
"jsonrpc-client-transports",
]
[[package]]
name = "jsonrpc-derive"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "jsonrpc-ipc-server"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "382bb0206323ca7cda3dcd7e245cea86d37d02457a02a975e3378fb149a48845"
dependencies = [
"futures 0.3.19",
"jsonrpc-core",
"jsonrpc-server-utils",
"log",
"parity-tokio-ipc",
"parking_lot 0.11.2",
"tower-service",
]
[[package]]
name = "jsonrpc-pubsub"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011"
dependencies = [
"futures 0.3.19",
"jsonrpc-core",
"lazy_static",
"log",
"parking_lot 0.11.2",
"rand 0.7.3",
"serde",
]
[[package]]
name = "jsonrpc-server-utils"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4"
dependencies = [
"bytes",
"futures 0.3.19",
"globset",
"jsonrpc-core",
"lazy_static",
"log",
"tokio",
"tokio-stream",
"tokio-util",
"unicase",
]
[[package]] [[package]]
name = "kstring" name = "kstring"
version = "2.0.0" version = "2.0.0"
@ -2257,30 +2111,6 @@ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
] ]
[[package]]
name = "lsp-codec"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa939d0b62476a5a19fb7fcb423a5c6ce8c7e09b851d37531e2fe3e0e6d9d257"
dependencies = [
"bytes",
"serde_json",
"tokio-util",
]
[[package]]
name = "lsp-types"
version = "0.60.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe3edefcd66dde1f7f1df706f46520a3c93adc5ca4bc5747da6621195e894efd"
dependencies = [
"bitflags",
"serde",
"serde_json",
"serde_repr",
"url 2.2.2",
]
[[package]] [[package]]
name = "lzma-sys" name = "lzma-sys"
version = "0.1.16" version = "0.1.16"
@ -2445,19 +2275,6 @@ dependencies = [
"adler 1.0.2", "adler 1.0.2",
] ]
[[package]]
name = "mio"
version = "0.7.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
dependencies = [
"libc",
"log",
"miow",
"ntapi",
"winapi",
]
[[package]] [[package]]
name = "miow" name = "miow"
version = "0.3.7" version = "0.3.7"
@ -2509,15 +2326,6 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
[[package]]
name = "ntapi"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
dependencies = [
"winapi",
]
[[package]] [[package]]
name = "num-integer" name = "num-integer"
version = "0.1.43" version = "0.1.43"
@ -2646,12 +2454,6 @@ dependencies = [
"vcpkg", "vcpkg",
] ]
[[package]]
name = "ordslice"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd20eec3dbe4376829cb7d80ae6ac45e0a766831dca50202ff2d40db46a8a024"
[[package]] [[package]]
name = "os_info" name = "os_info"
version = "3.5.0" version = "3.5.0"
@ -2717,20 +2519,6 @@ dependencies = [
"unwind", "unwind",
] ]
[[package]]
name = "parity-tokio-ipc"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9981e32fb75e004cc148f5fb70342f393830e0a4aa62e3cc93b50976218d42b6"
dependencies = [
"futures 0.3.19",
"libc",
"log",
"rand 0.7.3",
"tokio",
"winapi",
]
[[package]] [[package]]
name = "parking_lot" name = "parking_lot"
version = "0.11.2" version = "0.11.2"
@ -2785,12 +2573,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd"
[[package]]
name = "percent-encoding"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
[[package]] [[package]]
name = "percent-encoding" name = "percent-encoding"
version = "2.1.0" version = "2.1.0"
@ -2960,15 +2742,6 @@ dependencies = [
"log", "log",
] ]
[[package]]
name = "proc-macro-crate"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785"
dependencies = [
"toml",
]
[[package]] [[package]]
name = "proc-macro-error" name = "proc-macro-error"
version = "1.0.4" version = "1.0.4"
@ -3078,37 +2851,6 @@ dependencies = [
"proc-macro2", "proc-macro2",
] ]
[[package]]
name = "racer"
version = "2.2.2"
dependencies = [
"bitflags",
"derive_more",
"env_logger 0.7.1",
"humantime 2.0.1",
"lazy_static",
"lazycell",
"log",
"racer-cargo-metadata",
"rls-span",
]
[[package]]
name = "racer-cargo-metadata"
version = "0.1.2"
dependencies = [
"racer-interner",
"serde",
"serde_json",
]
[[package]]
name = "racer-interner"
version = "0.1.0"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.7.3" version = "0.7.3"
@ -3303,67 +3045,9 @@ dependencies = [
[[package]] [[package]]
name = "rls" name = "rls"
version = "1.41.0" version = "2.0.0"
dependencies = [ dependencies = [
"anyhow",
"cargo",
"cargo-util",
"cargo_metadata 0.14.0",
"clippy_lints",
"crossbeam-channel",
"difference",
"env_logger 0.9.0",
"futures 0.3.19",
"heck",
"home",
"itertools",
"jsonrpc-core",
"lazy_static",
"log",
"lsp-codec",
"lsp-types",
"num_cpus",
"ordslice",
"racer",
"rand 0.8.5",
"rayon",
"regex",
"rls-analysis",
"rls-data",
"rls-ipc",
"rls-rustc",
"rls-span",
"rls-vfs",
"rustc-workspace-hack", "rustc-workspace-hack",
"rustc_tools_util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustfmt-nightly",
"serde",
"serde_derive",
"serde_ignored",
"serde_json",
"tempfile",
"tokio",
"tokio-stream",
"tokio-util",
"toml",
"toml_edit",
"url 2.2.2",
"walkdir",
]
[[package]]
name = "rls-analysis"
version = "0.18.3"
dependencies = [
"derive-new",
"env_logger 0.9.0",
"fst",
"itertools",
"json",
"lazy_static",
"log",
"rls-data",
"rls-span",
"serde", "serde",
"serde_json", "serde_json",
] ]
@ -3378,33 +3062,6 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "rls-ipc"
version = "0.1.0"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
"jsonrpc-ipc-server",
"rls-data",
"serde",
]
[[package]]
name = "rls-rustc"
version = "0.6.0"
dependencies = [
"clippy_lints",
"env_logger 0.9.0",
"futures 0.3.19",
"log",
"rand 0.8.5",
"rls-data",
"rls-ipc",
"serde",
"tokio",
]
[[package]] [[package]]
name = "rls-span" name = "rls-span"
version = "0.5.3" version = "0.5.3"
@ -3414,16 +3071,6 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "rls-vfs"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce4b57b25b4330ed5ec14028fc02141e083ddafda327e7eb598dc0569c8c83c9"
dependencies = [
"log",
"rls-span",
]
[[package]] [[package]]
name = "rust-demangler" name = "rust-demangler"
version = "0.0.1" version = "0.0.1"
@ -3523,21 +3170,13 @@ name = "rustc-workspace-hack"
version = "1.0.0" version = "1.0.0"
dependencies = [ dependencies = [
"bstr", "bstr",
"byteorder",
"clap", "clap",
"crossbeam-utils",
"libc",
"libz-sys", "libz-sys",
"memchr", "memchr",
"proc-macro2",
"quote",
"rand_core 0.5.1",
"regex", "regex",
"serde",
"serde_json", "serde_json",
"smallvec",
"syn", "syn",
"url 2.2.2", "url",
"winapi", "winapi",
] ]
@ -4540,12 +4179,6 @@ dependencies = [
name = "rustc_tools_util" name = "rustc_tools_util"
version = "0.2.0" version = "0.2.0"
[[package]]
name = "rustc_tools_util"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b725dadae9fabc488df69a287f5a99c5eaf5d10853842a8a3dfac52476f544ee"
[[package]] [[package]]
name = "rustc_trait_selection" name = "rustc_trait_selection"
version = "0.0.0" version = "0.0.0"
@ -4852,18 +4485,18 @@ dependencies = [
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.140" version = "1.0.143"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.140" version = "1.0.143"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -4881,9 +4514,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.82" version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"itoa", "itoa",
@ -4891,17 +4524,6 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "serde_repr"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "sha-1" name = "sha-1"
version = "0.8.2" version = "0.8.2"
@ -4957,15 +4579,6 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42a568c8f2cd051a4d283bd6eb0343ac214c1b0f1ac19f93e1175b2dee38c73d" checksum = "42a568c8f2cd051a4d283bd6eb0343ac214c1b0f1ac19f93e1175b2dee38c73d"
[[package]]
name = "signal-hook-registry"
version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce32ea0c6c56d5eacaeb814fbed9960547021d3edd010ded1425f180536b20ab"
dependencies = [
"libc",
]
[[package]] [[package]]
name = "similar" name = "similar"
version = "2.1.0" version = "2.1.0"
@ -5350,39 +4963,8 @@ checksum = "50dae83881bc9b0403dd5b44ea9deed3e939856cc8722d5be37f0d6e5c6d53dd"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"bytes", "bytes",
"libc",
"memchr", "memchr",
"mio",
"num_cpus",
"once_cell",
"pin-project-lite", "pin-project-lite",
"signal-hook-registry",
"winapi",
]
[[package]]
name = "tokio-stream"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b2f3f698253f03119ac0102beaa64f67a67e08074d03a22d18784104543727f"
dependencies = [
"futures-core",
"pin-project-lite",
"tokio",
]
[[package]]
name = "tokio-util"
version = "0.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592"
dependencies = [
"bytes",
"futures-core",
"futures-sink",
"log",
"pin-project-lite",
"tokio",
] ]
[[package]] [[package]]
@ -5413,12 +4995,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa7c7f42dea4b1b99439786f5633aeb9c14c1b53f75e282803c2ec2ad545873c" checksum = "aa7c7f42dea4b1b99439786f5633aeb9c14c1b53f75e282803c2ec2ad545873c"
[[package]]
name = "tower-service"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
[[package]] [[package]]
name = "tracing" name = "tracing"
version = "0.1.29" version = "0.1.29"
@ -5742,17 +5318,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "url"
version = "1.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a"
dependencies = [
"idna 0.1.5",
"matches",
"percent-encoding 1.0.1",
]
[[package]] [[package]]
name = "url" name = "url"
version = "2.2.2" version = "2.2.2"
@ -5760,9 +5325,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
dependencies = [ dependencies = [
"form_urlencoded", "form_urlencoded",
"idna 0.2.0", "idna",
"matches", "matches",
"percent-encoding 2.1.0", "percent-encoding",
"serde", "serde",
] ]

View File

@ -97,21 +97,6 @@ gimli.debug = 0
miniz_oxide.debug = 0 miniz_oxide.debug = 0
object.debug = 0 object.debug = 0
# We want the RLS to use the version of Cargo that we've got vendored in this
# repository to ensure that the same exact version of Cargo is used by both the
# RLS and the Cargo binary itself. The RLS depends on Cargo as a git repository
# so we use a `[patch]` here to override the github repository with our local
# vendored copy.
[patch."https://github.com/rust-lang/cargo"]
cargo = { path = "src/tools/cargo" }
cargo-util = { path = "src/tools/cargo/crates/cargo-util" }
[patch."https://github.com/rust-lang/rustfmt"]
# Similar to Cargo above we want the RLS to use a vendored version of `rustfmt`
# that we're shipping as well (to ensure that the rustfmt in RLS and the
# `rustfmt` executable are the same exact version).
rustfmt-nightly = { path = "src/tools/rustfmt" }
[patch.crates-io] [patch.crates-io]
# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on # See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
# here # here

View File

@ -2,7 +2,7 @@ This directory contains the source code of the rust project, including:
- The test suite - The test suite
- The bootstrapping build system - The bootstrapping build system
- Various submodules for tools, like rustdoc, rls, etc. - Various submodules for tools, like cargo, miri, etc.
For more information on how various parts of the compiler work, see the [rustc dev guide]. For more information on how various parts of the compiler work, see the [rustc dev guide].

View File

@ -650,7 +650,6 @@ impl<'a> Builder<'a> {
test::ReplacePlaceholderTest, test::ReplacePlaceholderTest,
test::Cargotest, test::Cargotest,
test::Cargo, test::Cargo,
test::Rls,
test::RustAnalyzer, test::RustAnalyzer,
test::ErrorIndex, test::ErrorIndex,
test::Distcheck, test::Distcheck,
@ -737,7 +736,6 @@ impl<'a> Builder<'a> {
install::Docs, install::Docs,
install::Std, install::Std,
install::Cargo, install::Cargo,
install::Rls,
install::RustAnalyzer, install::RustAnalyzer,
install::Rustfmt, install::Rustfmt,
install::RustDemangler, install::RustDemangler,

View File

@ -457,7 +457,7 @@ tool_check_step!(Rustdoc, "src/tools/rustdoc", "src/librustdoc", SourceType::InT
// rejected. // rejected.
tool_check_step!(Clippy, "src/tools/clippy", SourceType::InTree); tool_check_step!(Clippy, "src/tools/clippy", SourceType::InTree);
tool_check_step!(Miri, "src/tools/miri", SourceType::Submodule); tool_check_step!(Miri, "src/tools/miri", SourceType::Submodule);
tool_check_step!(Rls, "src/tools/rls", SourceType::Submodule); tool_check_step!(Rls, "src/tools/rls", SourceType::InTree);
tool_check_step!(Rustfmt, "src/tools/rustfmt", SourceType::InTree); tool_check_step!(Rustfmt, "src/tools/rustfmt", SourceType::InTree);
tool_check_step!(Bootstrap, "src/bootstrap", SourceType::InTree, false); tool_check_step!(Bootstrap, "src/bootstrap", SourceType::InTree, false);

View File

@ -1018,10 +1018,7 @@ impl Step for Rls {
let rls = builder let rls = builder
.ensure(tool::Rls { compiler, target, extra_features: Vec::new() }) .ensure(tool::Rls { compiler, target, extra_features: Vec::new() })
.or_else(|| { .expect("rls expected to build");
missing_tool("RLS", builder.build.config.missing_tools);
None
})?;
let mut tarball = Tarball::new(builder, "rls", &target.triple); let mut tarball = Tarball::new(builder, "rls", &target.triple);
tarball.set_overlay(OverlayKind::RLS); tarball.set_overlay(OverlayKind::RLS);

View File

@ -182,15 +182,6 @@ install!((self, builder, _config),
.expect("missing cargo"); .expect("missing cargo");
install_sh(builder, "cargo", self.compiler.stage, Some(self.target), &tarball); install_sh(builder, "cargo", self.compiler.stage, Some(self.target), &tarball);
}; };
Rls, alias = "rls", Self::should_build(_config), only_hosts: true, {
if let Some(tarball) = builder.ensure(dist::Rls { compiler: self.compiler, target: self.target }) {
install_sh(builder, "rls", self.compiler.stage, Some(self.target), &tarball);
} else {
builder.info(
&format!("skipping Install RLS stage{} ({})", self.compiler.stage, self.target),
);
}
};
RustAnalyzer, alias = "rust-analyzer", Self::should_build(_config), only_hosts: true, { RustAnalyzer, alias = "rust-analyzer", Self::should_build(_config), only_hosts: true, {
if let Some(tarball) = if let Some(tarball) =
builder.ensure(dist::RustAnalyzer { compiler: self.compiler, target: self.target }) builder.ensure(dist::RustAnalyzer { compiler: self.compiler, target: self.target })

View File

@ -273,7 +273,6 @@ pub struct Build {
bootstrap_out: PathBuf, bootstrap_out: PathBuf,
rust_info: channel::GitInfo, rust_info: channel::GitInfo,
cargo_info: channel::GitInfo, cargo_info: channel::GitInfo,
rls_info: channel::GitInfo,
rust_analyzer_info: channel::GitInfo, rust_analyzer_info: channel::GitInfo,
clippy_info: channel::GitInfo, clippy_info: channel::GitInfo,
miri_info: channel::GitInfo, miri_info: channel::GitInfo,
@ -407,7 +406,6 @@ impl Build {
let ignore_git = config.ignore_git; let ignore_git = config.ignore_git;
let rust_info = channel::GitInfo::new(ignore_git, &src); let rust_info = channel::GitInfo::new(ignore_git, &src);
let cargo_info = channel::GitInfo::new(ignore_git, &src.join("src/tools/cargo")); let cargo_info = channel::GitInfo::new(ignore_git, &src.join("src/tools/cargo"));
let rls_info = channel::GitInfo::new(ignore_git, &src.join("src/tools/rls"));
let rust_analyzer_info = let rust_analyzer_info =
channel::GitInfo::new(ignore_git, &src.join("src/tools/rust-analyzer")); channel::GitInfo::new(ignore_git, &src.join("src/tools/rust-analyzer"));
let clippy_info = channel::GitInfo::new(ignore_git, &src.join("src/tools/clippy")); let clippy_info = channel::GitInfo::new(ignore_git, &src.join("src/tools/clippy"));
@ -485,7 +483,6 @@ impl Build {
rust_info, rust_info,
cargo_info, cargo_info,
rls_info,
rust_analyzer_info, rust_analyzer_info,
clippy_info, clippy_info,
miri_info, miri_info,

View File

@ -50,11 +50,7 @@ impl OverlayKind {
OverlayKind::RustDemangler => { OverlayKind::RustDemangler => {
&["src/tools/rust-demangler/README.md", "LICENSE-APACHE", "LICENSE-MIT"] &["src/tools/rust-demangler/README.md", "LICENSE-APACHE", "LICENSE-MIT"]
} }
OverlayKind::RLS => &[ OverlayKind::RLS => &["src/tools/rls/README.md", "LICENSE-APACHE", "LICENSE-MIT"],
"src/tools/rls/README.md",
"src/tools/rls/LICENSE-APACHE",
"src/tools/rls/LICENSE-MIT",
],
OverlayKind::RustAnalyzer => &[ OverlayKind::RustAnalyzer => &[
"src/tools/rust-analyzer/README.md", "src/tools/rust-analyzer/README.md",
"src/tools/rust-analyzer/LICENSE-APACHE", "src/tools/rust-analyzer/LICENSE-APACHE",
@ -78,7 +74,7 @@ impl OverlayKind {
OverlayKind::Rustfmt => { OverlayKind::Rustfmt => {
builder.rustfmt_info.version(builder, &builder.release_num("rustfmt")) builder.rustfmt_info.version(builder, &builder.release_num("rustfmt"))
} }
OverlayKind::RLS => builder.rls_info.version(builder, &builder.release_num("rls")), OverlayKind::RLS => builder.release(&builder.release_num("rls")),
OverlayKind::RustAnalyzer => builder OverlayKind::RustAnalyzer => builder
.rust_analyzer_info .rust_analyzer_info
.version(builder, &builder.release_num("rust-analyzer/crates/rust-analyzer")), .version(builder, &builder.release_num("rust-analyzer/crates/rust-analyzer")),

View File

@ -299,57 +299,6 @@ impl Step for Cargo {
} }
} }
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct Rls {
stage: u32,
host: TargetSelection,
}
impl Step for Rls {
type Output = ();
const ONLY_HOSTS: bool = true;
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src/tools/rls")
}
fn make_run(run: RunConfig<'_>) {
run.builder.ensure(Rls { stage: run.builder.top_stage, host: run.target });
}
/// Runs `cargo test` for the rls.
fn run(self, builder: &Builder<'_>) {
let stage = self.stage;
let host = self.host;
let compiler = builder.compiler(stage, host);
let build_result =
builder.ensure(tool::Rls { compiler, target: self.host, extra_features: Vec::new() });
if build_result.is_none() {
eprintln!("failed to test rls: could not build");
return;
}
let mut cargo = tool::prepare_tool_cargo(
builder,
compiler,
Mode::ToolRustc,
host,
"test",
"src/tools/rls",
SourceType::Submodule,
&[],
);
cargo.add_rustc_lib_path(builder, compiler);
cargo.arg("--").args(builder.config.cmd.test_args());
if try_run(builder, &mut cargo.into()) {
builder.save_toolstate("rls", ToolState::TestPass);
}
}
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct RustAnalyzer { pub struct RustAnalyzer {
stage: u32, stage: u32,

View File

@ -857,14 +857,7 @@ tool_extended!((self, builder),
Clippy, "src/tools/clippy", "clippy-driver", stable=true, in_tree=true, {}; Clippy, "src/tools/clippy", "clippy-driver", stable=true, in_tree=true, {};
Miri, "src/tools/miri", "miri", stable=false, {}; Miri, "src/tools/miri", "miri", stable=false, {};
CargoMiri, "src/tools/miri/cargo-miri", "cargo-miri", stable=false, {}; CargoMiri, "src/tools/miri/cargo-miri", "cargo-miri", stable=false, {};
Rls, "src/tools/rls", "rls", stable=true, { Rls, "src/tools/rls", "rls", stable=true, {};
builder.ensure(Clippy {
compiler: self.compiler,
target: self.target,
extra_features: Vec::new(),
});
self.extra_features.push("clippy".to_owned());
};
// FIXME: tool_std is not quite right, we shouldn't allow nightly features. // FIXME: tool_std is not quite right, we shouldn't allow nightly features.
// But `builder.cargo` doesn't know how to handle ToolBootstrap in stages other than 0, // But `builder.cargo` doesn't know how to handle ToolBootstrap in stages other than 0,
// and this is close enough for now. // and this is close enough for now.

View File

@ -69,7 +69,6 @@ static STABLE_TOOLS: &[(&str, &str)] = &[
("reference", "src/doc/reference"), ("reference", "src/doc/reference"),
("rust-by-example", "src/doc/rust-by-example"), ("rust-by-example", "src/doc/rust-by-example"),
("edition-guide", "src/doc/edition-guide"), ("edition-guide", "src/doc/edition-guide"),
("rls", "src/tools/rls"),
]; ];
// These tools are permitted to not build on the beta/stable channels. // These tools are permitted to not build on the beta/stable channels.

View File

@ -14,7 +14,6 @@ python3 "$X_PY" test --stage 2 --no-fail-fast \
src/doc/rust-by-example \ src/doc/rust-by-example \
src/doc/embedded-book \ src/doc/embedded-book \
src/doc/edition-guide \ src/doc/edition-guide \
src/tools/rls \
src/tools/miri \ src/tools/miri \
set -e set -e

View File

@ -676,8 +676,7 @@ jobs:
--enable-full-tools --enable-full-tools
--enable-profiler --enable-profiler
SCRIPT: python x.py dist SCRIPT: python x.py dist
# RLS does not build for aarch64-pc-windows-msvc. See rust-lang/rls#1693 DIST_REQUIRE_ALL_TOOLS: 1
DIST_REQUIRE_ALL_TOOLS: 0
# Hack around this SDK version, because it doesn't work with clang. # Hack around this SDK version, because it doesn't work with clang.
# See https://github.com/rust-lang/rust/issues/88796 # See https://github.com/rust-lang/rust/issues/88796
WINDOWS_SDK_20348_HACK: 1 WINDOWS_SDK_20348_HACK: 1

View File

@ -31,7 +31,6 @@ except ImportError:
# read privileges on it). CI will fail otherwise. # read privileges on it). CI will fail otherwise.
MAINTAINERS = { MAINTAINERS = {
'miri': {'oli-obk', 'RalfJung'}, 'miri': {'oli-obk', 'RalfJung'},
'rls': {'Xanewok'},
'book': {'carols10cents'}, 'book': {'carols10cents'},
'nomicon': {'frewsxcv', 'Gankra', 'JohnTitor'}, 'nomicon': {'frewsxcv', 'Gankra', 'JohnTitor'},
'reference': {'Havvy', 'matthewjasper', 'ehuss'}, 'reference': {'Havvy', 'matthewjasper', 'ehuss'},
@ -43,7 +42,6 @@ MAINTAINERS = {
LABELS = { LABELS = {
'miri': ['A-miri', 'C-bug'], 'miri': ['A-miri', 'C-bug'],
'rls': ['A-rls', 'C-bug'],
'book': ['C-bug'], 'book': ['C-bug'],
'nomicon': ['C-bug'], 'nomicon': ['C-bug'],
'reference': ['C-bug'], 'reference': ['C-bug'],
@ -55,7 +53,6 @@ LABELS = {
REPOS = { REPOS = {
'miri': 'https://github.com/rust-lang/miri', 'miri': 'https://github.com/rust-lang/miri',
'rls': 'https://github.com/rust-lang/rls',
'book': 'https://github.com/rust-lang/book', 'book': 'https://github.com/rust-lang/book',
'nomicon': 'https://github.com/rust-lang/nomicon', 'nomicon': 'https://github.com/rust-lang/nomicon',
'reference': 'https://github.com/rust-lang/reference', 'reference': 'https://github.com/rust-lang/reference',

@ -1 +0,0 @@
Subproject commit 4d8b0a19986a4daab37287a5b5fe2da0775d1873

13
src/tools/rls/Cargo.toml Normal file
View File

@ -0,0 +1,13 @@
[package]
name = "rls"
version = "2.0.0"
edition = "2021"
license = "Apache-2.0/MIT"
[dependencies]
serde = { version = "1.0.143", features = ["derive"] }
serde_json = "1.0.83"
# A noop dependency that changes in the Rust repository, it's a bit of a hack.
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
# for more information.
rustc-workspace-hack = "1.0.0"

6
src/tools/rls/README.md Normal file
View File

@ -0,0 +1,6 @@
# RLS Stub
RLS has been replaced with [rust-analyzer](https://rust-analyzer.github.io/).
This directory contains a stub which replaces RLS with a simple LSP server
which only displays an alert to the user that RLS is no longer available.

101
src/tools/rls/src/main.rs Normal file
View File

@ -0,0 +1,101 @@
//! RLS stub.
//!
//! This is a small stub that replaces RLS to alert the user that RLS is no
//! longer available.
use serde::Deserialize;
use std::error::Error;
use std::io::BufRead;
use std::io::Write;
const ALERT_MSG: &str = "\
RLS is no longer available as of Rust 1.65.
Consider migrating to rust-analyzer instead.
See https://rust-analyzer.github.io/ for installation instructions.
";
fn main() {
if let Err(e) = run() {
eprintln!("error: {e}");
std::process::exit(1);
}
}
#[derive(Deserialize)]
struct Message {
method: Option<String>,
}
fn run() -> Result<(), Box<dyn Error>> {
let mut stdin = std::io::stdin().lock();
let mut stdout = std::io::stdout().lock();
let init = read_message(&mut stdin)?;
if init.method.as_deref() != Some("initialize") {
return Err(format!("expected initialize, got {:?}", init.method).into());
}
// No response, the LSP specification says that `showMessageRequest` may
// be posted before during this phase.
// message_type 1 is "Error"
let alert = serde_json::json!({
"jsonrpc": "2.0",
"id": 1,
"method": "window/showMessageRequest",
"params": {
"message_type": "1",
"message": ALERT_MSG
}
});
write_message_raw(&mut stdout, serde_json::to_string(&alert).unwrap())?;
loop {
let message = read_message(&mut stdin)?;
if message.method.as_deref() == Some("shutdown") {
std::process::exit(0);
}
}
}
fn read_message_raw<R: BufRead>(reader: &mut R) -> Result<String, Box<dyn Error>> {
let mut content_length: usize = 0;
// Read headers.
loop {
let mut line = String::new();
reader.read_line(&mut line)?;
if line.is_empty() {
return Err("remote disconnected".into());
}
if line == "\r\n" {
break;
}
if line.to_lowercase().starts_with("content-length:") {
let value = &line[15..].trim();
content_length = usize::from_str_radix(value, 10)?;
}
}
if content_length == 0 {
return Err("no content-length".into());
}
let mut buffer = vec![0; content_length];
reader.read_exact(&mut buffer)?;
let content = String::from_utf8(buffer)?;
Ok(content)
}
fn read_message<R: BufRead>(reader: &mut R) -> Result<Message, Box<dyn Error>> {
let m = read_message_raw(reader)?;
match serde_json::from_str(&m) {
Ok(m) => Ok(m),
Err(e) => Err(format!("failed to parse message {m}\n{e}").into()),
}
}
fn write_message_raw<W: Write>(mut writer: W, output: String) -> Result<(), Box<dyn Error>> {
write!(writer, "Content-Length: {}\r\n\r\n{}", output.len(), output)?;
writer.flush()?;
Ok(())
}

View File

@ -24,6 +24,7 @@ features = [
"errhandlingapi", "errhandlingapi",
"evntrace", "evntrace",
"fibersapi", "fibersapi",
"handleapi",
"in6addr", "in6addr",
"inaddr", "inaddr",
"ioapiset", "ioapiset",
@ -72,11 +73,8 @@ features = [
[dependencies] [dependencies]
bstr = { version = "0.2.17", features = ["default"] } bstr = { version = "0.2.17", features = ["default"] }
byteorder = { version = "1", features = ['default', 'std'] }
clap = { version = "3.1.1", features = ["derive", "clap_derive"]} clap = { version = "3.1.1", features = ["derive", "clap_derive"]}
curl-sys = { version = "0.4.13", features = ["http2", "libnghttp2-sys"], optional = true } curl-sys = { version = "0.4.13", features = ["http2", "libnghttp2-sys"], optional = true }
crossbeam-utils = { version = "0.8.0", features = ["nightly"] }
libc = { version = "0.2.79", features = ["align"] }
# Ensure default features of libz-sys, which are disabled in some scenarios. # Ensure default features of libz-sys, which are disabled in some scenarios.
libz-sys = { version = "1.1.2" } libz-sys = { version = "1.1.2" }
# The only user of memchr's deprecated `use_std` feature is `combine`, so this can be # The only user of memchr's deprecated `use_std` feature is `combine`, so this can be
@ -84,13 +82,8 @@ libz-sys = { version = "1.1.2" }
memchr = { version = "2.5", features = ["std", "use_std"] } memchr = { version = "2.5", features = ["std", "use_std"] }
# Ensure default features of regex, which are disabled in some scenarios. # Ensure default features of regex, which are disabled in some scenarios.
regex = { version = "1.5.6" } regex = { version = "1.5.6" }
proc-macro2 = { version = "1", features = ["default"] }
quote = { version = "1", features = ["default"] }
rand_core_0_5 = { package = "rand_core", version = "0.5.1", features = ["getrandom", "alloc", "std"] }
serde = { version = "1.0.82", features = ['derive'] }
serde_json = { version = "1.0.31", features = ["raw_value", "unbounded_depth"] } serde_json = { version = "1.0.31", features = ["raw_value", "unbounded_depth"] }
smallvec = { version = "1.8.1", features = ['union', 'may_dangle'] } syn = { version = "1", features = ['full', 'visit'] }
syn = { version = "1", features = ['fold', 'full', 'extra-traits', 'visit', 'visit-mut'] }
url = { version = "2.0", features = ['serde'] } url = { version = "2.0", features = ['serde'] }
[target.'cfg(not(windows))'.dependencies] [target.'cfg(not(windows))'.dependencies]

View File

@ -2,18 +2,18 @@
This crate is a bit of a hack to make workspaces in rustc work a bit better. This crate is a bit of a hack to make workspaces in rustc work a bit better.
The rationale for this existence is a bit subtle, but the general idea is that The rationale for this existence is a bit subtle, but the general idea is that
we want commands like `./x.py build src/tools/{rls,clippy,cargo}` to share as we want commands like `./x.py build src/tools/{clippy,cargo}` to share as
many dependencies as possible. many dependencies as possible.
Each invocation is a different invocation of Cargo, however. Each time Cargo Each invocation is a different invocation of Cargo, however. Each time Cargo
runs a build it will re-resolve the dependency graph, notably selecting runs a build it will re-resolve the dependency graph, notably selecting
different features sometimes for each build. different features sometimes for each build.
For example, let's say there's a very deep dependency like `num-traits` in each For example, let's say there's a very deep dependency like `winapi` in each of
of these builds. For Cargo the `num-traits`'s `default` feature is turned off. these builds. For Cargo, `winapi` has 33 features enabled. In Clippy, however,
In RLS, however, the `default` feature is turned. This means that building Cargo `winapi` has 22 features enabled. This means that building Cargo and then the
and then the RLS will actually build Cargo twice (as a transitive dependency Clippy will actually build winapi twice, which in turn will build duplicates
changed). This is bad! of everything that depends on `winapi`. This is bad!
The goal of this crate is to solve this problem and ensure that the resolved The goal of this crate is to solve this problem and ensure that the resolved
dependency graph for all of these tools is the same in the various subsets of dependency graph for all of these tools is the same in the various subsets of

View File

@ -51,7 +51,3 @@ git tag -s v1.2.3 -m "Release 1.2.3"
`cargo publish` `cargo publish`
## 5. Create a PR to rust-lang/rust to update the rustfmt submodule ## 5. Create a PR to rust-lang/rust to update the rustfmt submodule
Note that if you are updating `rustc-ap-*` crates, then you need to update **every** submodules in the rust-lang/rust repository that depend on the crates to use the same version of those.
As of 2019/05, there are two such crates: `rls` and `racer` (`racer` depends on `rustc-ap-syntax` and `rls` depends on `racer`, and `rls` is one of submodules of the rust-lang/rust repository).

View File

@ -135,7 +135,7 @@ completed without error (whether or not changes were made).
* [Emacs](https://github.com/rust-lang/rust-mode) * [Emacs](https://github.com/rust-lang/rust-mode)
* [Sublime Text 3](https://packagecontrol.io/packages/RustFmt) * [Sublime Text 3](https://packagecontrol.io/packages/RustFmt)
* [Atom](atom.md) * [Atom](atom.md)
* Visual Studio Code using [vscode-rust](https://github.com/editor-rs/vscode-rust), [vsc-rustfmt](https://github.com/Connorcpu/vsc-rustfmt) or [rls_vscode](https://github.com/jonathandturner/rls_vscode) through RLS. * [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
* [IntelliJ or CLion](intellij.md) * [IntelliJ or CLion](intellij.md)

View File

@ -1,8 +1,8 @@
# Running Rustfmt from Atom # Running Rustfmt from Atom
## RLS ## rust-analyzer
Rustfmt is included with the Rust Language Server, itself provided by [ide-rust](https://atom.io/packages/ide-rust). Rustfmt can be utilized from [rust-analyzer](https://rust-analyzer.github.io/) which is provided by [ide-rust](https://atom.io/packages/ide-rust).
`apm install ide-rust` `apm install ide-rust`

View File

@ -31,8 +31,7 @@ const EXCEPTIONS: &[(&str, &str)] = &[
("mdbook", "MPL-2.0"), // mdbook ("mdbook", "MPL-2.0"), // mdbook
("openssl", "Apache-2.0"), // cargo, mdbook ("openssl", "Apache-2.0"), // cargo, mdbook
("colored", "MPL-2.0"), // rustfmt ("colored", "MPL-2.0"), // rustfmt
("ordslice", "Apache-2.0"), // rls ("ryu", "Apache-2.0 OR BSL-1.0"), // cargo/... (because of serde)
("ryu", "Apache-2.0 OR BSL-1.0"), // rls/cargo/... (because of serde)
("bytesize", "Apache-2.0"), // cargo ("bytesize", "Apache-2.0"), // cargo
("im-rc", "MPL-2.0+"), // cargo ("im-rc", "MPL-2.0+"), // cargo
("sized-chunks", "MPL-2.0+"), // cargo via im-rc ("sized-chunks", "MPL-2.0+"), // cargo via im-rc