Function: bazel--external-repository-roots
bazel--external-repository-roots is a natively compiled function
defined in bazel.el.
Signature
(bazel--external-repository-roots MAIN-ROOT)
Documentation
Return the directory names of the external repository roots.
MAIN-ROOT should be the name or file name of the main repository root directory as returned by ‘bazel--repository-root’.
Source Code
;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
(defun bazel--external-repository-roots (main-root)
"Return the directory names of the external repository roots.
MAIN-ROOT should be the name or file name of the main repository
root directory as returned by ‘bazel--repository-root’."
(declare (ftype (function (string) list)))
(cl-check-type main-root string)
(when-let* ((dir (bazel--external-repository-dir main-root)))
(let ((case-fold-search nil)
(search-spaces-regexp nil))
(mapcar
(if (file-name-quoted-p main-root) #'file-name-quote #'identity)
;; If there’s no external repository directory, don’t signal an error.
(ignore-error file-missing
(directory-files
dir :full
;; https://bazel.build/rules/lib/globals/module#parameters-8 states
;; that module names may only contain letters, numbers, underscores,
;; hyphens, and dots. We also include the plus sign since it’s part
;; of canonical repository names.
(rx bos (any ?+ "A-Z" "a-z") (* (any ?+ ?- ?. ?_ "A-Z" "a-z" "0-9"))
eos)))))))