Home / Function/ check_symlink_loop() — tailwindcss Function Reference

check_symlink_loop() — tailwindcss Function Reference

Architecture documentation for the check_symlink_loop() function in walk.rs from the tailwindcss codebase.

Function rust RustCore MachineExtractor calls 3 called by 1

Entity Profile

Dependency Diagram

graph TD
  f0d10255_d3b9_4506_b0c6_97817d725ef3["check_symlink_loop()"]
  2d1043b4_619e_f9a7_faf3_ee4e1cdbb69f["generate_work()"]
  2d1043b4_619e_f9a7_faf3_ee4e1cdbb69f -->|calls| f0d10255_d3b9_4506_b0c6_97817d725ef3
  60ca1299_5a36_c331_ab0a_e448cb652dda["from_path()"]
  f0d10255_d3b9_4506_b0c6_97817d725ef3 -->|calls| 60ca1299_5a36_c331_ab0a_e448cb652dda
  f831f03e_8ebe_d6c7_b6f8_2e25a759b231["parents()"]
  f0d10255_d3b9_4506_b0c6_97817d725ef3 -->|calls| f831f03e_8ebe_d6c7_b6f8_2e25a759b231
  afe9c39f_a243_0367_bdf6_a556fadd6383["path()"]
  f0d10255_d3b9_4506_b0c6_97817d725ef3 -->|calls| afe9c39f_a243_0367_bdf6_a556fadd6383
  style f0d10255_d3b9_4506_b0c6_97817d725ef3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/ignore/src/walk.rs lines 1876–1904

fn check_symlink_loop(
    ig_parent: &Ignore,
    child_path: &Path,
    child_depth: usize,
) -> Result<(), Error> {
    let hchild = Handle::from_path(child_path).map_err(|err| {
        Error::from(err)
            .with_path(child_path)
            .with_depth(child_depth)
    })?;
    for ig in ig_parent
        .parents()
        .take_while(|ig| !ig.is_absolute_parent())
    {
        let h = Handle::from_path(ig.path()).map_err(|err| {
            Error::from(err)
                .with_path(child_path)
                .with_depth(child_depth)
        })?;
        if hchild == h {
            return Err(Error::Loop {
                ancestor: ig.path().to_path_buf(),
                child: child_path.to_path_buf(),
            }
            .with_depth(child_depth));
        }
    }
    Ok(())
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does check_symlink_loop() do?
check_symlink_loop() is a function in the tailwindcss codebase.
What does check_symlink_loop() call?
check_symlink_loop() calls 3 function(s): from_path, parents, path.
What calls check_symlink_loop()?
check_symlink_loop() is called by 1 function(s): generate_work.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free