Skip to main content
MODULE.aspect at your repo root declares external AXL module dependencies, the way MODULE.bazel declares Bazel dependencies. Once declared, a module is loadable from any .axl file in the repo.

Declaring a dependency

Use axl_archive_dep to pull in a module from an archive URL:
MODULE.aspect
aspect axl add writes this entry for you from a GitHub release, integrity included. Parameters: To use a module from a directory on disk, such as a checkout you’re developing, use axl_local_dep. A relative path resolves against the directory holding MODULE.aspect:
MODULE.aspect

Loading from a module

After declaring a dependency, use load() to import specific symbols. This example loads a shared list of lint aspects from the my_tasks module declared above and sets it as the lint task’s default:
.aspect/config.axl
load() path forms:
  • "@module_name//path/to/file.axl": a file inside a declared external module
  • "@aspect//traits.axl": the built-in Aspect library (always available, no declaration needed)
  • "./relative.axl": relative to the current file
  • "path/from/repo/root.axl": absolute from the workspace root (no leading ./)

Exporting tasks and features from a module

A module’s own MODULE.aspect names what it exports, with paths relative to the module root. auto_use_tasks = True in the consuming repo registers the exported tasks.
MODULE.aspect (in the module)

Built-in @aspect library

The @aspect module is always available without a MODULE.aspect declaration. It exports the built-in traits, features and utilities used throughout the config examples in these docs:
Every feature it registers, with its options and defaults, is in the built-in features reference.