Skip to content

Commit 73c02a5

Browse files
committed
fix(fsi status): use byte comparison for transform equality test
1 parent 98e0cfc commit 73c02a5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

base/component/kinds.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,12 @@ func (tc *TransformComponent) Compare(compare Component) (bool, error) {
669669
if err := compare.LoadAndFill(nil); err != nil {
670670
return false, err
671671
}
672-
return compareComponentData(tc.Value, other.Value)
672+
673+
// TODO (b5) - for now we're only comparing script bytes, which means changes to transform
674+
// configuration won't be detected by things like status, What's more, because stored transforms include
675+
// a starlark syntax and a "qri" key, comparing FSI to stored JSON won't be equal
676+
// Let's clean this up
677+
return bytes.Equal(tc.Value.ScriptBytes, other.Value.ScriptBytes), nil
673678
}
674679

675680
// WriteTo writes the component as a file to the directory

fsi/status.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ func (fsi *FSI) Status(ctx context.Context, dir string) (changes []StatusItem, e
9090

9191
stored.DropDerivedValues()
9292
stored.Commit = nil
93-
stored.Transform = nil
9493
stored.Peername = ""
9594

9695
working, err := component.ListDirectoryComponents(dir)

0 commit comments

Comments
 (0)