Skip to content

[FR]: Make it possible to do pathces for archives #934

@TrapsterDK

Description

@TrapsterDK

What is the current behavior?

Currently when you define a dependency in MODULE.aspect there is no way to apply patches to it.

axl_archive_dep(
    name = "impacted",
    urls = ["https://github.com/aspect-extensions/impacted/archive/b3f503fe6c6d8ac21ed061cc6b078b1886228b35.tar.gz"],
    integrity = "sha256-pUp+0FZ/b+5KqCYFwZ1itxlOrSrA5lSDvdGpjnMypbQ=",
    strip_prefix = "impacted-b3f503fe6c6d8ac21ed061cc6b078b1886228b35",
    dev = True,
    auto_use_tasks = True,
)

# unable to patch it 

Describe the feature

Bazel has something called archive_override that has the defination None archive_override(module_name, urls, integrity='', strip_prefix='', patches=[], patch_cmds=[], patch_strip=0).
This is very useful when you want to use a library but only want to apply fixes that are not yet merged in, not planned, or similar. This otherwise does not seem possible to do without forking the archive, which might not be wanted. An example of this use case would be for aspect_rules_lint, where I want to patch some issues until they get merged or change some behaviour for our use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions