Path canonicalization has become prevalent in the Rust community, for reasons which I will explain. It is a solution to a very real problem but I suggest that it is not a good solution and there is a better alternative. I argue for increasing ergonomics at no cost in correctness.
I will discuss what path canonicalization is, why it is in widespread use, what is unergonomic about this approach, and a more ergonomic alternative.
Path canonicalization is use of std::fs::canonicalize aka Path::canonicalize, which (to quote the documentation) returns the canonical, absolute form of a path with all intermediate components normalized and symbolic links resolved.
That is, relative paths are made absolute (with reference to the current working directory, or cwd), and any symbolic links along the path are resolved to their ultimate destination, with reference to the filesystem. "Ultimate" here acknowledges that symbolic links can refer to other symbolic links. The resolution is ruthless in expunging all such links from the resulting path.
By far the the biggest reason for eager and early path canonicalization is to mitigate breakage in finding a parent directory, or the containing directory of a file.