change request id to u32 to make powerpc happy
This commit is contained in:
parent
5cdad62e1d
commit
b65078edce
3 changed files with 10 additions and 9 deletions
|
|
@ -8,7 +8,7 @@ use crate::{
|
|||
legacy_protocol::msg::{FlatTree, Message, PanicMessage, ServerConfig},
|
||||
};
|
||||
|
||||
pub type RequestId = u64;
|
||||
pub type RequestId = u32;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct Envelope {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use std::{
|
|||
process::{Child, ChildStdin, ChildStdout, Command, Stdio},
|
||||
sync::{
|
||||
Arc, Mutex, OnceLock,
|
||||
atomic::{AtomicU64, Ordering},
|
||||
atomic::{AtomicU32, Ordering},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ pub(crate) struct ProcMacroServerProcess {
|
|||
protocol: Protocol,
|
||||
/// Populated when the server exits.
|
||||
exited: OnceLock<AssertUnwindSafe<ServerError>>,
|
||||
next_request_id: AtomicU64,
|
||||
next_request_id: AtomicU32,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
@ -94,7 +94,7 @@ impl ProcMacroServerProcess {
|
|||
version: 0,
|
||||
protocol: protocol.clone(),
|
||||
exited: OnceLock::new(),
|
||||
next_request_id: AtomicU64::new(1),
|
||||
next_request_id: AtomicU32::new(1),
|
||||
})
|
||||
};
|
||||
let mut srv = create_srv()?;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ use proc_macro_api::{
|
|||
version::CURRENT_API_VERSION,
|
||||
};
|
||||
|
||||
use bidirectional::RequestId;
|
||||
use legacy::Message;
|
||||
|
||||
use proc_macro_srv::{EnvSnapshot, SpanId};
|
||||
|
|
@ -128,7 +129,7 @@ fn handle_expand<W: std::io::Write, R: std::io::BufRead, C: Codec>(
|
|||
stdin: &mut R,
|
||||
stdout: &mut W,
|
||||
buf: &mut C::Buf,
|
||||
req_id: u64,
|
||||
req_id: RequestId,
|
||||
span_mode: legacy::SpanMode,
|
||||
task: bidirectional::ExpandMacro,
|
||||
) -> io::Result<()> {
|
||||
|
|
@ -143,7 +144,7 @@ fn handle_expand<W: std::io::Write, R: std::io::BufRead, C: Codec>(
|
|||
fn handle_expand_id<W: std::io::Write, C: Codec>(
|
||||
srv: &proc_macro_srv::ProcMacroSrv<'_>,
|
||||
stdout: &mut W,
|
||||
req_id: u64,
|
||||
req_id: RequestId,
|
||||
task: bidirectional::ExpandMacro,
|
||||
) -> io::Result<()> {
|
||||
let bidirectional::ExpandMacro { lib, env, current_dir, data } = task;
|
||||
|
|
@ -189,7 +190,7 @@ fn handle_expand_ra<W: std::io::Write, R: std::io::BufRead, C: Codec>(
|
|||
stdin: &mut R,
|
||||
stdout: &mut W,
|
||||
buf: &mut C::Buf,
|
||||
req_id: u64,
|
||||
req_id: RequestId,
|
||||
task: bidirectional::ExpandMacro,
|
||||
) -> io::Result<()> {
|
||||
let bidirectional::ExpandMacro {
|
||||
|
|
@ -473,7 +474,7 @@ fn from_client_res(value: bidirectional::SubResponse) -> proc_macro_srv::SubResp
|
|||
|
||||
fn send_response<W: std::io::Write, C: Codec>(
|
||||
stdout: &mut W,
|
||||
id: u64,
|
||||
id: u32,
|
||||
resp: bidirectional::Response,
|
||||
) -> io::Result<()> {
|
||||
let resp = bidirectional::Envelope {
|
||||
|
|
@ -486,7 +487,7 @@ fn send_response<W: std::io::Write, C: Codec>(
|
|||
|
||||
fn send_subrequest<W: std::io::Write, C: Codec>(
|
||||
stdout: &mut W,
|
||||
id: u64,
|
||||
id: u32,
|
||||
resp: bidirectional::SubRequest,
|
||||
) -> io::Result<()> {
|
||||
let resp = bidirectional::Envelope {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue