Function: bazel-compile-current-file
bazel-compile-current-file is an interactive and natively compiled
function defined in bazel.el.
Signature
(bazel-compile-current-file)
Documentation
Compile the file that the current buffer visits with Bazel.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
(defun bazel-compile-current-file ()
"Compile the file that the current buffer visits with Bazel."
(declare (ftype (function () null)))
(interactive)
(let* ((file-name (or buffer-file-name
(user-error "Buffer doesn’t visit a file")))
;; “bazel build --compile_one_dependency” accepts file names relative
;; to the current directory.
(relative-name (file-relative-name file-name)))
(bazel--compile "build" "--compile_one_dependency" "--" relative-name))
nil)