build: rearrange dependencies (#399)

This commit is contained in:
Myriad-Dreamin 2024-07-11 11:03:55 +08:00 committed by GitHub
parent 1b769a4ddd
commit 4acc39b237
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 261 additions and 229 deletions

View file

@ -26,7 +26,6 @@ serde_json.workspace = true
parking_lot.workspace = true
ena.workspace = true
once_cell.workspace = true
fxhash.workspace = true
toml.workspace = true
walkdir.workspace = true
indexmap.workspace = true
@ -38,15 +37,13 @@ typst.workspace = true
reflexo.workspace = true
lsp-types.workspace = true
if_chain = "1"
percent-encoding = "2"
unscanny = "0.1"
pathdiff = "0.2"
ttf-parser = "0.20.0"
rust_iso639 = "0.0.1"
rust_iso3166 = "0.1.4"
# We need to freeze the version of the crate, as the raw-api feature is considered unstable
if_chain.workspace = true
percent-encoding.workspace = true
unscanny.workspace = true
pathdiff.workspace = true
ttf-parser.workspace = true
rust_iso639.workspace = true
rust_iso3166.workspace = true
dashmap.workspace = true
rustc-hash.workspace = true
hashbrown.workspace = true

View file

@ -24,8 +24,8 @@ use std::{
use dashmap::{DashMap, SharedValue};
use ecow::EcoString;
use fxhash::FxHasher;
use hashbrown::{hash_map::RawEntryMut, HashMap};
use rustc_hash::FxHasher;
use triomphe::Arc;
use typst::{foundations::Str, syntax::ast::Ident};

View file

@ -15,7 +15,7 @@ use std::ops;
pub use ena::undo_log::Snapshot;
type FxHashMap<K, V> = fxhash::FxHashMap<K, V>;
type FxHashMap<K, V> = rustc_hash::FxHashMap<K, V>;
pub type SnapshotMapStorage<K, V> = SnapshotMap<K, V, FxHashMap<K, V>, ()>;
pub type SnapshotMapRef<'a, K, V, L> = SnapshotMap<K, V, &'a mut FxHashMap<K, V>, &'a mut L>;

View file

@ -21,8 +21,17 @@ pub(crate) use sig::*;
mod tests {
use super::*;
use crate::adt::interner::Interned;
use fxhash::hash64;
use reflexo::vector::ir::DefId;
use rustc_hash::FxHasher;
use std::hash::{Hash, Hasher};
/// A convenience function for when you need a quick 64-bit hash.
#[inline]
pub fn hash64<T: Hash + ?Sized>(v: &T) -> u64 {
let mut state = FxHasher::default();
v.hash(&mut state);
state.finish()
}
pub fn var_ins(s: &str) -> Ty {
Ty::Var(TypeVar::new(s.into(), DefId(hash64(s))))

View file

@ -62,15 +62,14 @@ typst-preview = { workspace = true, optional = true }
lsp-server.workspace = true
crossbeam-channel.workspace = true
lsp-types.workspace = true
dhat = { version = "0.3.3", optional = true }
chrono = { version = "0.4" }
unicode-script = "0.5"
await-tree = "0.1.2"
hyper = { version = "0.14", features = ["full"], optional = true }
open = { version = "5.1.3", optional = true }
tower-layer = "0.3.2"
tower-service = "0.3.2"
pin-project-lite = "0.2.13"
dhat = { workspace = true, optional = true }
unicode-script.workspace = true
await-tree.workspace = true
hyper = { workspace = true, optional = true }
open = { workspace = true, optional = true }
tower-layer.workspace = true
tower-service.workspace = true
pin-project-lite.workspace = true
base64.workspace = true
rayon.workspace = true

View file

@ -23,14 +23,14 @@ typst-ts-core = { workspace = true, default-features = false, features = [
typst-ts-compiler.workspace = true
once_cell.workspace = true
tokio.workspace = true
tokio-tungstenite = "0.21.0"
tokio-tungstenite.workspace = true
env_logger.workspace = true
log.workspace = true
serde_json.workspace = true
futures.workspace = true
indexmap.workspace = true
serde.workspace = true
await-tree = "0.1.2"
await-tree.workspace = true
clap = { workspace = true, optional = true }