mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Rename ra_proc_macro -> proc_macro_api
This commit is contained in:
parent
4abdf323af
commit
2119dc23e8
13 changed files with 26 additions and 25 deletions
28
Cargo.lock
generated
28
Cargo.lock
generated
|
@ -909,6 +909,18 @@ dependencies = [
|
||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "proc_macro_api"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"crossbeam-channel",
|
||||||
|
"jod-thread",
|
||||||
|
"log",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"tt",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc_macro_srv"
|
name = "proc_macro_srv"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
@ -919,7 +931,7 @@ dependencies = [
|
||||||
"libloading",
|
"libloading",
|
||||||
"mbe",
|
"mbe",
|
||||||
"memmap",
|
"memmap",
|
||||||
"ra_proc_macro",
|
"proc_macro_api",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
"test_utils",
|
"test_utils",
|
||||||
"toolchain",
|
"toolchain",
|
||||||
|
@ -948,8 +960,8 @@ dependencies = [
|
||||||
"cfg",
|
"cfg",
|
||||||
"log",
|
"log",
|
||||||
"paths",
|
"paths",
|
||||||
|
"proc_macro_api",
|
||||||
"ra_db",
|
"ra_db",
|
||||||
"ra_proc_macro",
|
|
||||||
"rustc-hash",
|
"rustc-hash",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
@ -1131,18 +1143,6 @@ dependencies = [
|
||||||
"text_edit",
|
"text_edit",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ra_proc_macro"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"crossbeam-channel",
|
|
||||||
"jod-thread",
|
|
||||||
"log",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"tt",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ra_ssr"
|
name = "ra_ssr"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "ra_proc_macro"
|
name = "proc_macro_api"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["rust-analyzer developers"]
|
authors = ["rust-analyzer developers"]
|
||||||
publish = false
|
publish = false
|
||||||
|
@ -10,9 +10,10 @@ license = "MIT OR Apache-2.0"
|
||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tt = { path = "../tt" }
|
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
log = "0.4.8"
|
log = "0.4.8"
|
||||||
crossbeam-channel = "0.4.0"
|
crossbeam-channel = "0.4.0"
|
||||||
jod-thread = "0.1.1"
|
jod-thread = "0.1.1"
|
||||||
|
|
||||||
|
tt = { path = "../tt" }
|
|
@ -1,4 +1,4 @@
|
||||||
//! Data struture serialization related stuff for RPC
|
//! Data structure serialization related stuff for RPC
|
||||||
//!
|
//!
|
||||||
//! Defines all necessary rpc serialization data structures,
|
//! Defines all necessary rpc serialization data structures,
|
||||||
//! which includes `tt` related data and some task messages.
|
//! which includes `tt` related data and some task messages.
|
|
@ -15,7 +15,7 @@ memmap = "0.7"
|
||||||
|
|
||||||
tt = { path = "../tt" }
|
tt = { path = "../tt" }
|
||||||
mbe = { path = "../mbe" }
|
mbe = { path = "../mbe" }
|
||||||
ra_proc_macro = { path = "../ra_proc_macro" }
|
proc_macro_api = { path = "../proc_macro_api" }
|
||||||
test_utils = { path = "../test_utils" }
|
test_utils = { path = "../test_utils" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
//! Driver for proc macro server
|
//! Driver for proc macro server
|
||||||
|
|
||||||
use crate::ProcMacroSrv;
|
use crate::ProcMacroSrv;
|
||||||
use ra_proc_macro::msg::{self, Message};
|
use proc_macro_api::msg::{self, Message};
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
||||||
pub fn run() -> io::Result<()> {
|
pub fn run() -> io::Result<()> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ use std::path::{Path, PathBuf};
|
||||||
use goblin::{mach::Mach, Object};
|
use goblin::{mach::Mach, Object};
|
||||||
use libloading::Library;
|
use libloading::Library;
|
||||||
use memmap::Mmap;
|
use memmap::Mmap;
|
||||||
use ra_proc_macro::ProcMacroKind;
|
use proc_macro_api::ProcMacroKind;
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
||||||
const NEW_REGISTRAR_SYMBOL: &str = "_rustc_proc_macro_decls_";
|
const NEW_REGISTRAR_SYMBOL: &str = "_rustc_proc_macro_decls_";
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
//! * We use `tt` for proc-macro `TokenStream` server, it is easier to manipulate and interact with
|
//! * We use `tt` for proc-macro `TokenStream` server, it is easier to manipulate and interact with
|
||||||
//! RA than `proc-macro2` token stream.
|
//! RA than `proc-macro2` token stream.
|
||||||
//! * By **copying** the whole rustc `lib_proc_macro` code, we are able to build this with `stable`
|
//! * By **copying** the whole rustc `lib_proc_macro` code, we are able to build this with `stable`
|
||||||
//! rustc rather than `unstable`. (Although in gerenal ABI compatibility is still an issue)
|
//! rustc rather than `unstable`. (Although in general ABI compatibility is still an issue)…
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
@ -20,7 +20,7 @@ mod rustc_server;
|
||||||
mod dylib;
|
mod dylib;
|
||||||
|
|
||||||
use proc_macro::bridge::client::TokenStream;
|
use proc_macro::bridge::client::TokenStream;
|
||||||
use ra_proc_macro::{ExpansionResult, ExpansionTask, ListMacrosResult, ListMacrosTask};
|
use proc_macro_api::{ExpansionResult, ExpansionTask, ListMacrosResult, ListMacrosTask};
|
||||||
use std::{
|
use std::{
|
||||||
collections::{hash_map::Entry, HashMap},
|
collections::{hash_map::Entry, HashMap},
|
||||||
fs,
|
fs,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use crate::dylib;
|
use crate::dylib;
|
||||||
use crate::ProcMacroSrv;
|
use crate::ProcMacroSrv;
|
||||||
use ra_proc_macro::ListMacrosTask;
|
use proc_macro_api::ListMacrosTask;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use test_utils::assert_eq_text;
|
use test_utils::assert_eq_text;
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,6 @@ arena = { path = "../arena" }
|
||||||
cfg = { path = "../cfg" }
|
cfg = { path = "../cfg" }
|
||||||
ra_db = { path = "../ra_db" }
|
ra_db = { path = "../ra_db" }
|
||||||
toolchain = { path = "../toolchain" }
|
toolchain = { path = "../toolchain" }
|
||||||
ra_proc_macro = { path = "../ra_proc_macro" }
|
proc_macro_api = { path = "../proc_macro_api" }
|
||||||
paths = { path = "../paths" }
|
paths = { path = "../paths" }
|
||||||
stdx = { path = "../stdx" }
|
stdx = { path = "../stdx" }
|
||||||
|
|
|
@ -25,7 +25,7 @@ pub use crate::{
|
||||||
sysroot::Sysroot,
|
sysroot::Sysroot,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub use ra_proc_macro::ProcMacroClient;
|
pub use proc_macro_api::ProcMacroClient;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||||
pub enum ProjectWorkspace {
|
pub enum ProjectWorkspace {
|
||||||
|
|
Loading…
Reference in a new issue