Skip to content

Commit 0e044a3

Browse files
committed
Enable symbol deprecation
1 parent 2f59cd3 commit 0e044a3

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ clap = { version = "4.4", features = ["derive", "env", "wrap_help"] }
4747
clap_complete = "4.2.1"
4848
clap_mangen = "0.2.10"
4949
codespan-reporting = "0.11"
50-
codex = { git = "https://github.com/typst/codex", rev = "343a9b1" }
50+
codex = { git = "https://github.com/typst/codex", rev = "c10161b" }
5151
color-print = "0.3.6"
5252
comemo = "0.4"
5353
csv = "1"

crates/typst-library/src/symbols.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,15 @@ impl From<codex::Symbol> for Symbol {
2828
}
2929

3030
fn extend_scope_from_codex_module(scope: &mut Scope, module: codex::Module) {
31-
for (name, definition) in module.iter() {
32-
let value = match definition {
31+
for (name, entry) in module.iter() {
32+
let value = match entry.definition {
3333
codex::Def::Symbol(s) => Value::Symbol(s.into()),
3434
codex::Def::Module(m) => Value::Module(Module::new(name, m.into())),
3535
};
36-
scope.define(name, value);
36+
match entry.deprecated {
37+
None => scope.define(name, value),
38+
Some(message) => scope.define_deprecated(name, value, message),
39+
}
3740
}
3841
}
3942

0 commit comments

Comments
 (0)