Skip to content

Commit

Permalink
Fix build script rerun-if-changed directives.
Browse files Browse the repository at this point in the history
It was pointing to an absent path. This is not the first time I made
this mistake.

Also, according to the documentation
<https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed>,
`rerun-if-changed=build.rs` is actually redundant.
  • Loading branch information
kpreid committed May 19, 2024
1 parent 5779393 commit 69b9b84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions all-is-cubes/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ use all_is_cubes_base::math::{self, Face6, FaceMap, FreePoint, FreeVector, Vecto
use all_is_cubes_base::raycast::Ray;

fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed=src/space/light/chart_schema_shared.rs");
println!("cargo:rerun-if-changed=src/space/light/chart/shared.rs");

let rays = generate_light_ray_pattern();
let chart = generate_light_propagation_chart(&rays);
Expand Down Expand Up @@ -125,6 +124,7 @@ fn writemuck<T: bytemuck::NoUninit>(out_relative_path: &Path, data: &[T]) {

use chart_schema::{OneRay, TargetEndian};

// If this module path changes, update the rerun-if-changed directive above!
#[path = "src/space/light/chart/"]
mod chart_schema {
use crate::math::{FaceMap, VectorOps as _};
Expand All @@ -133,6 +133,7 @@ mod chart_schema {
use num_traits::{FromBytes, ToBytes};
use std::env;

// If this module name changes, update the rerun-if-changed directive above!
mod shared;
pub(crate) use shared::{IndirectSteps, OneRay, Step, Steps};

Expand Down

0 comments on commit 69b9b84

Please sign in to comment.