Merge #5745
5745: Rename ra_proc_macro -> proc_macro_api
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
c2b1503fe4
28
Cargo.lock
generated
28
Cargo.lock
generated
@ -909,6 +909,18 @@ dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc_macro_api"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"jod-thread",
|
||||
"log",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc_macro_srv"
|
||||
version = "0.0.0"
|
||||
@ -919,7 +931,7 @@ dependencies = [
|
||||
"libloading",
|
||||
"mbe",
|
||||
"memmap",
|
||||
"ra_proc_macro",
|
||||
"proc_macro_api",
|
||||
"serde_derive",
|
||||
"test_utils",
|
||||
"toolchain",
|
||||
@ -948,8 +960,8 @@ dependencies = [
|
||||
"cfg",
|
||||
"log",
|
||||
"paths",
|
||||
"proc_macro_api",
|
||||
"ra_db",
|
||||
"ra_proc_macro",
|
||||
"rustc-hash",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@ -1131,18 +1143,6 @@ dependencies = [
|
||||
"text_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ra_proc_macro"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"jod-thread",
|
||||
"log",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ra_ssr"
|
||||
version = "0.1.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
edition = "2018"
|
||||
name = "ra_proc_macro"
|
||||
name = "proc_macro_api"
|
||||
version = "0.1.0"
|
||||
authors = ["rust-analyzer developers"]
|
||||
publish = false
|
||||
@ -10,9 +10,10 @@ license = "MIT OR Apache-2.0"
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
tt = { path = "../tt" }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
log = "0.4.8"
|
||||
crossbeam-channel = "0.4.0"
|
||||
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,
|
||||
//! which includes `tt` related data and some task messages.
|
@ -15,7 +15,7 @@ memmap = "0.7"
|
||||
|
||||
tt = { path = "../tt" }
|
||||
mbe = { path = "../mbe" }
|
||||
ra_proc_macro = { path = "../ra_proc_macro" }
|
||||
proc_macro_api = { path = "../proc_macro_api" }
|
||||
test_utils = { path = "../test_utils" }
|
||||
|
||||
[dev-dependencies]
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! Driver for proc macro server
|
||||
|
||||
use crate::ProcMacroSrv;
|
||||
use ra_proc_macro::msg::{self, Message};
|
||||
use proc_macro_api::msg::{self, Message};
|
||||
use std::io;
|
||||
|
||||
pub fn run() -> io::Result<()> {
|
||||
|
@ -7,7 +7,7 @@
|
||||
use goblin::{mach::Mach, Object};
|
||||
use libloading::Library;
|
||||
use memmap::Mmap;
|
||||
use ra_proc_macro::ProcMacroKind;
|
||||
use proc_macro_api::ProcMacroKind;
|
||||
use std::io;
|
||||
|
||||
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
|
||||
//! RA than `proc-macro2` token stream.
|
||||
//! * 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)]
|
||||
#[doc(hidden)]
|
||||
@ -20,7 +20,7 @@
|
||||
mod dylib;
|
||||
|
||||
use proc_macro::bridge::client::TokenStream;
|
||||
use ra_proc_macro::{ExpansionResult, ExpansionTask, ListMacrosResult, ListMacrosTask};
|
||||
use proc_macro_api::{ExpansionResult, ExpansionTask, ListMacrosResult, ListMacrosTask};
|
||||
use std::{
|
||||
collections::{hash_map::Entry, HashMap},
|
||||
fs,
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use crate::dylib;
|
||||
use crate::ProcMacroSrv;
|
||||
use ra_proc_macro::ListMacrosTask;
|
||||
use proc_macro_api::ListMacrosTask;
|
||||
use std::str::FromStr;
|
||||
use test_utils::assert_eq_text;
|
||||
|
||||
|
@ -20,6 +20,6 @@ arena = { path = "../arena" }
|
||||
cfg = { path = "../cfg" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
toolchain = { path = "../toolchain" }
|
||||
ra_proc_macro = { path = "../ra_proc_macro" }
|
||||
proc_macro_api = { path = "../proc_macro_api" }
|
||||
paths = { path = "../paths" }
|
||||
stdx = { path = "../stdx" }
|
||||
|
@ -25,7 +25,7 @@
|
||||
sysroot::Sysroot,
|
||||
};
|
||||
|
||||
pub use ra_proc_macro::ProcMacroClient;
|
||||
pub use proc_macro_api::ProcMacroClient;
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub enum ProjectWorkspace {
|
||||
|
Loading…
Reference in New Issue
Block a user