mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-04 10:18:16 +00:00
feat: adapts build meta for wasm target (#1243)
This commit is contained in:
parent
4eb747f883
commit
74c68f5485
3 changed files with 14 additions and 8 deletions
|
@ -218,6 +218,12 @@ broken_intra_doc_links = "warn"
|
|||
missing_docs = "warn"
|
||||
# missing_crate_level_docs = "warn"
|
||||
|
||||
unexpected_cfgs = { level = "allow", check-cfg = [
|
||||
'cfg(wasm_bindgen_unstable_test_coverage)',
|
||||
'cfg(noop)',
|
||||
'cfg(used_linker)',
|
||||
] }
|
||||
|
||||
[workspace.lints.clippy]
|
||||
uninlined_format_args = "warn"
|
||||
# missing_errors_doc = "warn"
|
||||
|
|
|
@ -42,7 +42,7 @@ pub struct DiagMessage {
|
|||
/// The file path relative to the root of the workspace or the package.
|
||||
pub path: String,
|
||||
/// The diagnostic message.
|
||||
pub message: String,
|
||||
pub message: EcoString,
|
||||
/// The severity of the diagnostic message.
|
||||
pub severity: DiagSeverity,
|
||||
/// The char range in the file. The position encoding must be negotiated.
|
||||
|
@ -410,30 +410,30 @@ pub mod prelude {
|
|||
#[macro_export]
|
||||
macro_rules! error_once {
|
||||
($loc:expr, $($arg_key:ident: $arg:expr),+ $(,)?) => {
|
||||
_error_once($loc, Box::new([$((stringify!($arg_key), $arg.to_string())),+]))
|
||||
$crate::error::prelude::_error_once($loc, Box::new([$((stringify!($arg_key), $arg.to_string())),+]))
|
||||
};
|
||||
($loc:expr $(,)?) => {
|
||||
_error_once($loc, Box::new([]))
|
||||
$crate::error::prelude::_error_once($loc, Box::new([]))
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! error_once_map {
|
||||
($loc:expr, $($arg_key:ident: $arg:expr),+ $(,)?) => {
|
||||
map_err_with_args($loc, [$((stringify!($arg_key), $arg.to_string())),+])
|
||||
$crate::error::prelude::map_err_with_args($loc, [$((stringify!($arg_key), $arg.to_string())),+])
|
||||
};
|
||||
($loc:expr $(,)?) => {
|
||||
map_err($loc)
|
||||
$crate::error::prelude::map_err($loc)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! error_once_map_string {
|
||||
($loc:expr, $($arg_key:ident: $arg:expr),+ $(,)?) => {
|
||||
map_string_err_with_args($loc, [$((stringify!($arg_key), $arg.to_string())),+])
|
||||
$crate::error::prelude::map_string_err_with_args($loc, [$((stringify!($arg_key), $arg.to_string())),+])
|
||||
};
|
||||
($loc:expr $(,)?) => {
|
||||
map_string_err($loc)
|
||||
$crate::error::prelude::map_string_err($loc)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ web = [
|
|||
"tinymist-vfs/web",
|
||||
"reflexo-typst/web",
|
||||
]
|
||||
browser = ["web"]
|
||||
browser = ["tinymist-vfs/browser", "web"]
|
||||
system = [
|
||||
"dep:dirs",
|
||||
"dep:fontdb",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue