Function: bazel--default-target
bazel--default-target is a natively compiled function defined in
bazel.el.
Signature
(bazel--default-target REPOSITORY PACKAGE)
Documentation
Return the default target name for REPOSITORY and PACKAGE.
For a package “foo/bar”, “bar” is the default target. For a repository “foo”, “foo” in the root package is the default target. REPOSITORY can be nil to refer to the current repository.
Source Code
;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
(defun bazel--default-target (repository package)
"Return the default target name for REPOSITORY and PACKAGE.
For a package “foo/bar”, “bar” is the default target. For a
repository “foo”, “foo” in the root package is the default target.
REPOSITORY can be nil to refer to the current repository."
(declare (ftype (function ((or null string) string) string)))
(cl-check-type repository (or null string))
(cl-check-type package string)
(cl-assert (not (string-empty-p repository)))
(if (and (stringp repository) (string-empty-p package))
repository
(let ((case-fold-search nil)
(search-spaces-regexp nil))
(pcase-exhaustive package
((rx (or bos ?/) (let target (* (not (any ?/)))) eos)
target)))))