mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-24 13:13:43 +00:00
build: cherry pick concurrent id error (#472)
* dev: commit reference changes * build: cherry pick concurrent id error
This commit is contained in:
parent
a6c81c80b0
commit
0c9d6623b4
5 changed files with 20 additions and 20 deletions
14
Cargo.lock
generated
14
Cargo.lock
generated
|
@ -4137,7 +4137,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "typst"
|
||||
version = "0.11.1"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?branch=tinymist-v0.11.1#152d935d379f524b12c6b55a14c6343b718956d6"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?tag=tinymist-v0.11.1-2#314749ea26ac3f62622bc3b3c30d3a7d6a457a74"
|
||||
dependencies = [
|
||||
"az",
|
||||
"bitflags 2.6.0",
|
||||
|
@ -4204,7 +4204,7 @@ checksum = "2b3061f8d268e8eec7481c9ab24540455cb4912983c49aae38fa6e8bf8ef4d9c"
|
|||
[[package]]
|
||||
name = "typst-macros"
|
||||
version = "0.11.1"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?branch=tinymist-v0.11.1#152d935d379f524b12c6b55a14c6343b718956d6"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?tag=tinymist-v0.11.1-2#314749ea26ac3f62622bc3b3c30d3a7d6a457a74"
|
||||
dependencies = [
|
||||
"heck 0.4.1",
|
||||
"proc-macro2",
|
||||
|
@ -4215,7 +4215,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "typst-pdf"
|
||||
version = "0.11.1"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?branch=tinymist-v0.11.1#152d935d379f524b12c6b55a14c6343b718956d6"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?tag=tinymist-v0.11.1-2#314749ea26ac3f62622bc3b3c30d3a7d6a457a74"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"bytemuck",
|
||||
|
@ -4263,7 +4263,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "typst-render"
|
||||
version = "0.11.1"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?branch=tinymist-v0.11.1#152d935d379f524b12c6b55a14c6343b718956d6"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?tag=tinymist-v0.11.1-2#314749ea26ac3f62622bc3b3c30d3a7d6a457a74"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"comemo 0.4.0",
|
||||
|
@ -4283,7 +4283,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "typst-svg"
|
||||
version = "0.11.1"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?branch=tinymist-v0.11.1#152d935d379f524b12c6b55a14c6343b718956d6"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?tag=tinymist-v0.11.1-2#314749ea26ac3f62622bc3b3c30d3a7d6a457a74"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"comemo 0.4.0",
|
||||
|
@ -4316,7 +4316,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "typst-syntax"
|
||||
version = "0.11.1"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?branch=tinymist-v0.11.1#152d935d379f524b12c6b55a14c6343b718956d6"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?tag=tinymist-v0.11.1-2#314749ea26ac3f62622bc3b3c30d3a7d6a457a74"
|
||||
dependencies = [
|
||||
"comemo 0.4.0",
|
||||
"ecow 0.2.2",
|
||||
|
@ -4332,7 +4332,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "typst-timing"
|
||||
version = "0.11.1"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?branch=tinymist-v0.11.1#152d935d379f524b12c6b55a14c6343b718956d6"
|
||||
source = "git+https://github.com/Myriad-Dreamin/typst.git?tag=tinymist-v0.11.1-2#314749ea26ac3f62622bc3b3c30d3a7d6a457a74"
|
||||
dependencies = [
|
||||
"parking_lot",
|
||||
"serde",
|
||||
|
|
12
Cargo.toml
12
Cargo.toml
|
@ -167,12 +167,12 @@ undocumented_unsafe_blocks = "warn"
|
|||
|
||||
tinymist-assets = { path = "./crates/tinymist-assets/" }
|
||||
|
||||
typst = { git = "https://github.com/Myriad-Dreamin/typst.git", branch = "tinymist-v0.11.1" }
|
||||
typst-timing = { git = "https://github.com/Myriad-Dreamin/typst.git", branch = "tinymist-v0.11.1" }
|
||||
typst-svg = { git = "https://github.com/Myriad-Dreamin/typst.git", branch = "tinymist-v0.11.1" }
|
||||
typst-render = { git = "https://github.com/Myriad-Dreamin/typst.git", branch = "tinymist-v0.11.1" }
|
||||
typst-pdf = { git = "https://github.com/Myriad-Dreamin/typst.git", branch = "tinymist-v0.11.1" }
|
||||
typst-syntax = { git = "https://github.com/Myriad-Dreamin/typst.git", branch = "tinymist-v0.11.1" }
|
||||
typst = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.11.1-2" }
|
||||
typst-timing = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.11.1-2" }
|
||||
typst-svg = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.11.1-2" }
|
||||
typst-render = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.11.1-2" }
|
||||
typst-pdf = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.11.1-2" }
|
||||
typst-syntax = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinymist-v0.11.1-2" }
|
||||
|
||||
# typst = { path = "../typst/crates/typst" }
|
||||
# typst-timing = { path = "../typst/crates/typst-timing" }
|
||||
|
|
|
@ -317,19 +317,19 @@ fn is_same_native_func(x: Option<&Func>, y: &Func) -> bool {
|
|||
/// Resolve a call target to a function or a method with a this.
|
||||
pub fn resolve_call_target(
|
||||
ctx: &mut AnalysisContext,
|
||||
callee: LinkedNode,
|
||||
callee: &LinkedNode,
|
||||
) -> Option<CallConvention> {
|
||||
resolve_callee_(ctx, callee, true).map(identify_call_convention)
|
||||
}
|
||||
|
||||
/// Resolve a callee expression to a function.
|
||||
pub fn resolve_callee(ctx: &mut AnalysisContext, callee: LinkedNode) -> Option<Func> {
|
||||
pub fn resolve_callee(ctx: &mut AnalysisContext, callee: &LinkedNode) -> Option<Func> {
|
||||
resolve_callee_(ctx, callee, false).map(|e| e.func_ptr)
|
||||
}
|
||||
|
||||
fn resolve_callee_(
|
||||
ctx: &mut AnalysisContext,
|
||||
callee: LinkedNode,
|
||||
callee: &LinkedNode,
|
||||
resolve_this: bool,
|
||||
) -> Option<DynCallTarget> {
|
||||
None.or_else(|| {
|
||||
|
@ -357,7 +357,7 @@ fn resolve_callee_(
|
|||
this: None,
|
||||
})
|
||||
.or_else(|| {
|
||||
let values = analyze_expr(ctx.world(), &callee);
|
||||
let values = analyze_expr(ctx.world(), callee);
|
||||
|
||||
if let Some(func) = values.into_iter().find_map(|v| match v.0 {
|
||||
Value::Func(f) => Some(f),
|
||||
|
|
|
@ -202,7 +202,7 @@ pub(crate) fn analyze_signature(
|
|||
// TryResolveCalleeResult::Runtime(func) => func,
|
||||
// };
|
||||
|
||||
let func = resolve_callee(ctx, node)?;
|
||||
let func = resolve_callee(ctx, &node)?;
|
||||
|
||||
log::debug!("got function {func:?}");
|
||||
func
|
||||
|
|
|
@ -563,7 +563,7 @@ pub fn param_completions<'a>(
|
|||
let Some(cc) = ctx
|
||||
.root
|
||||
.find(callee.span())
|
||||
.and_then(|callee| resolve_call_target(ctx.ctx, callee))
|
||||
.and_then(|callee| resolve_call_target(ctx.ctx, &callee))
|
||||
else {
|
||||
return;
|
||||
};
|
||||
|
@ -940,7 +940,7 @@ pub fn named_param_value_completions<'a>(
|
|||
let Some(cc) = ctx
|
||||
.root
|
||||
.find(callee.span())
|
||||
.and_then(|callee| resolve_call_target(ctx.ctx, callee))
|
||||
.and_then(|callee| resolve_call_target(ctx.ctx, &callee))
|
||||
else {
|
||||
// static analysis
|
||||
if let Some(ty) = ty {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue