fileoverlap

package
v0.2.0-dev.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

README

fileoverlap

fileoverlap is a conflict.Analyzer that reports a conflict between two batches when they change one or more of the same files.

Behavior

The files a batch changes are drawn from each change's provider-supplied details. The candidate batch conflicts with an in-flight batch when their changed-file sets intersect; each such in-flight batch is reported once, preserving the in-flight order. A shared file is the concrete notion of target overlap, so conflicts are classified as ConflictTypeTargetOverlap. A batch that changes no files conflicts with nothing, and an empty in-flight list yields no conflicts. A failure to resolve a batch's changes is returned as a (retryable) error.

File-path intersection is a deliberately simple notion of overlap. A richer one (build targets, ownership boundaries) would be a separate analyzer rather than a change to this one.

Documentation

Overview

Package fileoverlap provides a conflict.Analyzer that reports a conflict between two batches when they change one or more of the same files. It is the first analyzer to use the capability the extension contract unblocks: it takes only batch identity and resolves each batch's changed files itself through an injected changeset resolver, rather than depending on the controller to pre-compute them. A shared file is the concrete notion of target overlap, so it reports entity.ConflictTypeTargetOverlap.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(resolver changeset.Resolver) conflict.Analyzer

New returns a conflict.Analyzer that flags an in-flight batch as conflicting when it changes a file the candidate batch also changes. The resolver resolves each batch's changed files.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL