Remove checks for hyphenated library names
This CL removes checks for directories whose names are FIDL libraries
with "." replaced by "-". Those used to exist in zircon/system/fidl, but
no longer (that directory still exists but it only has build rules, no
FIDL files).
Change-Id: I9634d3c1e23844fd6bfab4d9a11925a2a382c844
Reviewed-on: https://fuchsia-review.googlesource.com/c/fidlbolt/+/587298
Reviewed-by: Yifei Teng <yifeit@google.com>
diff --git a/backend/analyze.go b/backend/analyze.go
index 38f8ef5..9073a25 100644
--- a/backend/analyze.go
+++ b/backend/analyze.go
@@ -79,7 +79,7 @@
// information to speed up future analyses.
type libraryAnalyzer struct {
// Paths in which to search for FIDL library files. Given library foo.bar,
- // the analyzer will check P/foo.bar and P/foo-bar for each path P in paths.
+ // the analyzer will check if $P/foo.bar/ exists for each path $P in paths.
// If one of these exists, it reads all descendent .fidl files.
paths []string
// Global cache of library information.
@@ -328,7 +328,11 @@
// directory named "vsdo" (fuchsia/zircon/vdso), not "zx".
return []string{"vdso"}
}
- return []string{string(lib), strings.ReplaceAll(string(lib), ".", "-")}
+ // Currently this function always returns one result. It used to also return
+ // strings.ReplaceAll(string(lib), ".", "-") back when zircon/system/fidl/
+ // had FIDL files under that scheme. We are keeping the []string return type
+ // in case this needs to return multiple results again in the future.
+ return []string{string(lib)}
}
// isPlatform returns true if lib adheres to the naming scheme for platform