Bazel Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 11: Line 11:
{{External|https://bazel.build/concepts/labels}}
{{External|https://bazel.build/concepts/labels}}
=BUILD files=
=BUILD files=
{{External|https://bazel.build/concepts/build-files}}
{{Internal|Bazel_BUILD_Files#Overview|Bazel BUILD Files}}
 
=<span id='Dependency'></span>Dependencies=
=<span id='Dependency'></span>Dependencies=
{{External|https://bazel.build/concepts/dependencies}}
{{External|https://bazel.build/concepts/dependencies}}

Revision as of 21:00, 16 July 2024

Internal

Repository

https://bazel.build/concepts/build-ref#repositories

Package

https://bazel.build/concepts/build-ref#packages

Target

https://bazel.build/concepts/build-ref#targets

Label

https://bazel.build/concepts/labels

BUILD files

Bazel BUILD Files

Dependencies

https://bazel.build/concepts/dependencies

Build Dependency Graph

Also see:

bazel query

Visibility

https://bazel.build/concepts/visibility

Platforms

https://bazel.build/concepts/platforms

Rules

Hermeticity

https://bazel.build/basics/hermeticity

Directories

Workspace

https://bazel.build/concepts/build-ref#workspace

A project's workspace is the directory where bazel looks for build inputs and BUILD files, and where it stores build outputs. The actual location is obtained with bazel info.

Bin

The actual location is obtained with bazel info.

Genfiles

The actual location is obtained with bazel info.

Testlogs

The actual location is obtained with bazel info.

Execution Root

The actual location is obtained with bazel info.

Install Base

The actual location is obtained with bazel info.

Output Base

The actual location is obtained with bazel info.

Output Path

The actual location is obtained with bazel info.

Package Path

%workspace%. See Workspace.

Repository Cache

The actual location is obtained with bazel info.

Files

Server Log

The actual location is obtained with bazel info.

Command Log

The actual location is obtained with bazel info.

.bazelrc

.bazelrc

Project View File

Seems to be this one:

directories:
 # Add the directories you want added as source here
 # By default, we've added your entire workspace ('.')
 .

# Automatically includes all relevant targets under the 'directories' above
derive_targets_from_directories: true

targets:
  # If source code isn't resolving, add additional targets that compile it here

additional_languages:
 # Uncomment any additional languages you want supported
 # android
 # dart
 # go
 # javascript
 # kotlin
 # python
 # scala
 # typescript

# Uncomment to run this target before every sync
# gazelle_target: //:gazelle

BUILD File

Starlark

https://bazel.build/rules/language

Bazelisk

A bazel runner. as "Bazel binary location" in the Bazel IntelliJ Plugin.

Bazel and IntelliJ

Sync Process

The sync process queries Bazel for information and builds IntelliJ project structure to fid Bazel's model. It runs automatically during a project import, and manually by clicking on the sync icon in the menu bar, or partially syncing packages and individual files in contextual menus.

If the file is not reachable from Bazel targets, it will show up as unsynced in the IDE.

TODO: https://blog.bazel.build/2019/09/29/intellij-bazel-sync.html