Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 1acff66

Browse files
Merge pull request #1775 from Mark-Simulacrum/fix-rls
Fix breakage due to upstream rustc changes
2 parents d8478d8 + aaa6866 commit 1acff66

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+12643
-132
lines changed

Cargo.lock

Lines changed: 128 additions & 101 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ rls-vfs = "0.8"
3131
rls-ipc = { version = "0.1.0", path = "rls-ipc", optional = true }
3232

3333
anyhow = "1.0.26"
34-
cargo = { git = "https://github.com/rust-lang/cargo", rev = "1ef1e0a12723ce9548d7da2b63119de9002bead8" }
35-
cargo-util = { git = "https://github.com/rust-lang/cargo", rev = "1ef1e0a12723ce9548d7da2b63119de9002bead8" }
34+
cargo = { git = "https://github.com/rust-lang/cargo", rev = "3f052d8eed98c6a24f8b332fb2e6e6249d12d8c1" }
35+
cargo-util = { git = "https://github.com/rust-lang/cargo", rev = "3f052d8eed98c6a24f8b332fb2e6e6249d12d8c1" }
3636
cargo_metadata = "0.14"
3737
clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", version = "0.1.60", optional = true }
3838
env_logger = "0.9"
@@ -43,11 +43,11 @@ lsp-types = { version = "0.60", features = ["proposed"] }
4343
lazy_static = "1"
4444
log = "0.4"
4545
num_cpus = "1"
46-
racer = { version = "2.2", default-features = false }
46+
racer = { path = "racer" }
4747
rand = "0.8"
4848
rayon = "1"
4949
rustc_tools_util = "0.2"
50-
rustfmt-nightly = { git = "https://github.com/rust-lang/rustfmt", rev = "5056f4cfb311a084420f1828cd58af94d143f5e0" }
50+
rustfmt-nightly = { git = "https://github.com/rust-lang/rustfmt", rev = "8a4c05865be17bac75b8d53eae5be18d749a0f5c" }
5151
serde = "1.0"
5252
serde_json = "1.0"
5353
serde_derive = "1.0"
@@ -58,7 +58,7 @@ regex = "1"
5858
ordslice = "0.3"
5959
crossbeam-channel = "0.5"
6060
toml = "0.5"
61-
toml_edit = { version = "0.13.4", features = ["easy"] }
61+
toml_edit = { version = "0.14.3", features = ["easy"] }
6262
heck = "0.3"
6363

6464
# A noop dependency that changes in the Rust repository, it's a bit of a hack.

racer/.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- master
9+
- '*'
10+
schedule:
11+
- cron: '0 0 * * *' # Nightly at 00:00 UTC
12+
13+
jobs:
14+
build_and_test:
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
toolchain:
19+
- x86_64-unknown-linux-gnu
20+
- x86_64-apple-darwin
21+
- x86_64-pc-windows-msvc
22+
- i686-pc-windows-msvc
23+
include:
24+
- toolchain: x86_64-unknown-linux-gnu
25+
builder: ubuntu-latest
26+
os: linux
27+
- toolchain: x86_64-apple-darwin
28+
builder: macos-latest
29+
os: macos
30+
- toolchain: x86_64-pc-windows-msvc
31+
builder: windows-latest
32+
os: windows
33+
- toolchain: i686-pc-windows-msvc
34+
builder: windows-latest
35+
os: windows
36+
37+
name: nightly - ${{ matrix.toolchain }}
38+
runs-on: ${{ matrix.builder }}
39+
40+
steps:
41+
- uses: actions/checkout@v2
42+
- name: Use latest nightly on scheduled builds
43+
if: github.event_name == 'schedule'
44+
run: echo "nightly" > rust-toolchain
45+
- run: rustup set default-host ${{ matrix.toolchain }}
46+
- run: rustup component add rust-src
47+
- run: rustc -vV
48+
- run: cargo build --verbose --all
49+
- run: cargo test --all

racer/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
\#*
2+
src/scopes
3+
!.travis.yml
4+
*tmpfile*
5+
*.racertmp
6+
target/
7+
*.py[cod]
8+
.vscode/**
9+
*.log

racer/.rustfmt.toml

Whitespace-only changes.

racer/CHANGELOG.md

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
Change Log
2+
==========
3+
4+
All notable changes to this project will be documented in this file. This
5+
project adheres to [Semantic Versioning](https://semver.org/).
6+
7+
# 2.1.37
8+
- Bump rustc-ap-* version to 677.0
9+
- Account for new standard library source directory layout
10+
11+
# 2.1.37
12+
- Bump rustc-ap-* version to 671.0
13+
14+
# 2.1.36
15+
- Bump rustc-ap-* version to 669.0
16+
17+
# 2.1.35
18+
- Bump rustc-ap-* version to 664.0
19+
20+
# 2.1.34
21+
- Bump rustc-ap-* version to 659.0
22+
- Fix submodule search (#1107)
23+
24+
# 2.1.33
25+
- Bump rustc-ap-* version to 654.0
26+
27+
# 2.1.32
28+
- Bump rustc-ap-* version to 651.0
29+
30+
# 2.1.31
31+
- Bump rustc-ap-* version to 642.0
32+
33+
# 2.1.30
34+
- Support for union(#1086)
35+
36+
# 2.1.29
37+
- Support async/await syntax(#1083, #1085)
38+
39+
# 2.1.28
40+
- Update the version of rustc-ap-syntax
41+
42+
# 2.1.27
43+
- Update the version of rustc-ap-syntax
44+
45+
# 2.1.26
46+
- Update the version of rustc-ap-syntax
47+
48+
# 2.1.25
49+
- Update the version of rustc-ap-syntax
50+
51+
# 2.1.24
52+
- Rust 2018 (#1051)
53+
- Update the version of rustc-ap-syntax
54+
55+
# 2.1.22
56+
- Fix completion for `super::super::...`(#1053)
57+
58+
# 2.1.20, 2.1.21
59+
- Fix completion in testdir for Rust 2018(#1022)
60+
- Fix enum variant completion for pub(crate) enum(#1025)
61+
62+
# 2.1.18, 2.1.19
63+
- Update rustc-ap-syntax
64+
65+
# 2.1.17, 2.1.18
66+
- Fix doc comment parsing(#1010)
67+
68+
# 2.1.15. 2.1.16
69+
- Handle CRLF correctly(#1007)
70+
71+
# 2.1.14
72+
- Completion for binary operation(#976)
73+
74+
# 2.1.10, 2.1.11, 2.1.12, 2.1.13
75+
- Completion for impl trait(#985, #986)
76+
- Completion for use as(#988)
77+
78+
# 2.1.8, 2.1.9
79+
- Completion for trait objects(#972)
80+
- Completion for simple closure return types(#973)
81+
82+
# 2.1.7
83+
- Lots of refactoring(#961, #963, #965)
84+
- Add `is_use_statement` for RLS(#965)
85+
86+
# 2.1.6
87+
- Completion based on impl<T: Bound> #948
88+
- Fix for argument completion #943
89+
- Trait bound in where clause #937
90+
91+
# 2.1.5
92+
- migrate to cargo metadata #930
93+
94+
# 2.1.3
95+
- Make cargo optional for RLS #910
96+
97+
## 2.1.2
98+
- Fix bug around getting `use` context #906
99+
- Update rustc-ap-syntax to fix build in current nightly #911
100+
101+
## 2.1.1
102+
- Fix coordinate bug
103+
- Get doc string for macro #905
104+
105+
## 2.1.0
106+
- Support completions for stdlib macros #902
107+
- Support extern "~" block #895
108+
- Support `crate_in_paths` #891
109+
- Fix bug of getting completion context from `use` statement #886
110+
- Handle const unsafe fn #879
111+
- Limit recursion depth through glob imports #875
112+
- Enable completion based on trait bound for function args #871
113+
- Fix bug in search_closure_args #862
114+
- Replace cargo.rs with cargo crate #855
115+
- Migrate over to rustc_ap_syntax #854
116+
- Make RUST_SRC_PATH optional #808
117+
- Refactor based on clippy #860
118+
119+
## 2.0.14
120+
- Cache generic impls #839
121+
- Cache parsed TOML file and cargo crate roots #838
122+
- Skip `pub` keyword as a temporary fix for #624 #850
123+
- Remove complex generic type by impl trait #848
124+
- Fix bug for array expression #841
125+
- Support completion for enum variants without type annotation #825
126+
- Fix bug for raw string #822
127+
128+
## 2.0.13
129+
- Fix bug for finding the start of match statement #819
130+
131+
## 2.0.12
132+
- Fix bug that broke completions in previous release #807
133+
134+
## 2.0.11
135+
136+
- Use `rustup` to find libstd path even when used as library #799
137+
138+
## 2.0.10
139+
140+
- Support resolving `use as` aliases declared in multi-element `use` statements #753
141+
- Provide suggestions for global paths in more cases #765
142+
- Suggestions imported via `use as` statements now return their in-scope alias as the match string #767
143+
- Add new commands for converting between points and coordinates in files #776
144+
- Return fewer duplicate suggestions #778
145+
- Handle cases where mod names and trait methods collide, such as `fmt` #781
146+
147+
## 2.0.9
148+
149+
- Support completion after using try operator `?` #726
150+
- Find methods on cooked string literals #728
151+
- Fix bug caused by closure completions feature #734
152+
- Find static methods on enums #737
153+
- Find doc comments on named and indexed struct fields #739
154+
- Find `pub(restricted)` items #748
155+
156+
## 2.0.8
157+
158+
- Fix bug finding definitions where impl contains bang #717
159+
- Find definition for closures #697
160+
- Resolve types for tuple struct fields #722
161+
- Resolve types for let patterns #724
162+
- Fix completions for reference fields #723
163+
164+
## 2.0.7
165+
166+
- Fix panic with macros called `impl*` #701
167+
- Relax semver specs
168+
169+
## 2.0.6
170+
171+
- resolve Self (e.g. in-impl function calls like Self::myfunction())
172+
- Fix stack overflow issue on unresolvable imports :tada: #698
173+
174+
## 2.0.5
175+
176+
- Chained completions on separate lines now work #686
177+
178+
## 2.0.4
179+
180+
- Fix for find-doc not always returning full doc string #675
181+
182+
## 2.0.3
183+
184+
- Fix for recursion in certain `use foo::{self, ..}` cases #669
185+
186+
## 2.0.2
187+
188+
- Internal fixes so we can publish on crates.io
189+
190+
## 2.0.1
191+
192+
- Syntex 0.52 #643
193+
194+
- Fix `racer --help` bug from 2.0 refactor #662
195+
196+
- Support short revision identifiers for git checkout paths #664
197+
198+
- Handle self resolution when using `use mymod::{self, Thing}` #665
199+
200+
- Fix type alias resolution #666
201+
202+
## 2.0
203+
204+
- Rework public API to hide many implementation details and allow the project to
205+
move forward without breaking changes.
206+
207+
- Many fixes that didn't make it into the changelog, but we're going to work on
208+
that in the future!
209+
210+
## 1.2
211+
212+
- Added basic 'daemon' mode, racer process can be kept running between
213+
invocations
214+
215+
- now uses clap to parse command line options
216+
217+
- Adds caching of file source and code indices
218+
219+
- Adds an alternative 'tabbed' mode where inputs and outputs can be tab
220+
separated for easier parsing
221+
222+
- emacs and vim support split out into their own git projects [emacs-racer] and
223+
[vim-racer], respectively.
224+
225+
- Fix issue resolving some `std::*` modules in latest rust source: (rust std lib
226+
implicitly imports core with `#![no_std]`)
227+
228+
- Searches multirust overrides when locating cargo src directories
229+
230+
## 1.0.0 2015-07-29
231+
232+
- First release
233+
234+
[vim-racer]: https://github.com/racer-rust/vim-racer
235+
[emacs-racer]: https://github.com/racer-rust/emacs-racer

racer/Cargo.toml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[package]
2+
name = "racer"
3+
version = "2.2.2"
4+
license = "MIT"
5+
description = "Code completion for Rust"
6+
authors = ["Phil Dawes <phil@phildawes.net>", "The Racer developers"]
7+
homepage = "https://github.com/racer-rust/racer"
8+
repository = "https://github.com/racer-rust/racer"
9+
edition = "2018"
10+
11+
[lib]
12+
name = "racer"
13+
path = "src/racer/lib.rs"
14+
15+
[profile.release]
16+
debug = false # because of #1005
17+
18+
[dependencies]
19+
bitflags = "1.0"
20+
log = "0.4"
21+
env_logger = "0.7.1"
22+
clap = "2.32"
23+
lazy_static = "1.2"
24+
humantime = "2.0.0"
25+
derive_more = "0.99.2"
26+
rls-span = "0.5.1"
27+
lazycell = { version = "1.2", optional = true }
28+
29+
[dependencies.racer-cargo-metadata]
30+
version = "0.1"
31+
optional = true
32+
path = "metadata"
33+
34+
[features]
35+
default = ["metadata"]
36+
metadata = ["lazycell", "racer-cargo-metadata"]
37+
38+
[workspace]
39+
members = ["interner", "metadata"]
40+
41+
[package.metadata.rust-analyzer]
42+
# This package uses #[feature(rustc_private)]
43+
rustc_private = true

0 commit comments

Comments
 (0)