Use canonical names to resolve relative labels in Stardoc
Previously, when a `.bzl` file was loaded via an apparent name and triggered a load of another file via a relative label, the new file would be loaded with that apparent name, which is incorrect.
This is solved by converting all apparent labels into canonical labels and only then turning those into runfiles paths.
Also ensures that line endings are consistent on all platforms.
Closes #18327.
PiperOrigin-RevId: 531006044
Change-Id: I15c2eea07c376aa5422a7b3bea14ad93b7f662a3
diff --git a/src/main/java/com/google/devtools/build/skydoc/SkydocOptions.java b/src/main/java/com/google/devtools/build/skydoc/SkydocOptions.java
index d91c2b4..4f22c16 100644
--- a/src/main/java/com/google/devtools/build/skydoc/SkydocOptions.java
+++ b/src/main/java/com/google/devtools/build/skydoc/SkydocOptions.java
@@ -28,7 +28,7 @@
defaultValue = "",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = OptionEffectTag.UNKNOWN,
- help = "The label of the target file for which to generate documentation")
+ help = "The canonical label of the target file for which to generate documentation")
public String targetFileLabel;
@Option(