Skip to content

perplexityai/rules_diff

Repository files navigation

rules_diff

A Bazel ruleset for creating and testing differences between files and directories.

Getting Started

Add the following to MODULE.bazel:

bazel_dep(name="rules_diff", version="0.0.0")

Use the differencing rules:

load("@rules_diff//diff/file/test:defs.bzl", "diff_file_test")

diff_file_test(
    name = "test",
    size = "small",
    a = ":some-file.txt",
    b = ":some-file.txt",
)

Hermeticity

The rules use a hermetic diff provided by the ape module.

Rules have Batch implementations so do not require Bash on Windows.

Release Registry

The project publishes the relevant files to GitLab releases for use when a version has not been added to the upstream BCR.

This is often the case for pre-release versions.

Add the following to .bazelrc:

# `bzlmod` pre-release registries
common --registry https://bcr.bazel.build
common --registry=https://gitlab.arm.com/bazel/rules_diff/-/releases/v1.0.0-alpha.1/downloads

Then a GitLab release version can be used in bazel_dep.

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Contributing

Stars

Watchers

Forks

Packages

No packages published