Skip to content

Commit

Permalink
Rerun build script only when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
cyqsimon committed Nov 2, 2023
1 parent 5fd0339 commit cbe755f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/syntax_mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ fn read_all_mappings() -> anyhow::Result<MappingList> {
/// Build the static syntax mappings defined in /src/syntax_mapping/builtins/
/// into a .rs source file, which is to be inserted with `include!`.
pub fn build_static_mappings() -> anyhow::Result<()> {
println!("cargo:rerun-if-changed=src/syntax_mapping/builtins/");

let mappings = read_all_mappings()?;

let codegen_path = Path::new(&env::var_os("OUT_DIR").ok_or(anyhow!("OUT_DIR is unset"))?)
Expand Down

0 comments on commit cbe755f

Please sign in to comment.