Say a deleted module's reason, read a context's reason at the merged branch, and keep the snapshot's bytes (hq ADR 0267, review)
This commit is contained in:
@@ -1567,6 +1567,7 @@ func planWhatIf(ctx context.Context, inv *inventory.Inventory, repository string
|
||||
return err
|
||||
}
|
||||
var from, packaging []inventory.Entry
|
||||
deleted := map[string]bool{}
|
||||
named := map[string]bool{}
|
||||
for _, name := range modules {
|
||||
named[name] = true
|
||||
@@ -1576,6 +1577,9 @@ func planWhatIf(ctx context.Context, inv *inventory.Inventory, repository string
|
||||
// request's check ask it (novox/hq ADR 0238).
|
||||
r := reachOfMerge(m, entries, read, nil)
|
||||
from, packaging = append(append([]inventory.Entry{}, r.Touched...), r.Deleted...), r.Packaging
|
||||
for _, e := range r.Deleted {
|
||||
deleted[e.Manifest.Module] = true
|
||||
}
|
||||
} else {
|
||||
for _, e := range entries {
|
||||
switch {
|
||||
@@ -1609,6 +1613,9 @@ func planWhatIf(ctx context.Context, inv *inventory.Inventory, repository string
|
||||
if len(named) == 0 {
|
||||
for _, e := range from {
|
||||
why[e.Manifest.Module] = whyMoved(e, read[e.Manifest.Module], m)
|
||||
if deleted[e.Manifest.Module] {
|
||||
why[e.Manifest.Module] = "its manifest is removed: deleted at its source, forgotten where nothing holds it, not built"
|
||||
}
|
||||
}
|
||||
}
|
||||
rolls := map[string]string{}
|
||||
|
||||
Reference in New Issue
Block a user