terraform/internal/refactoring
James Bardin f46cf7b8bc cleanup some move graph handling
Create a separate `validateMoveStatementGraph` function so that
`ValidateMoves` and `ApplyMoves` both check the same conditions. Since
we're not using the builtin `graph.Validate` method, because we may have
multiple roots and want better cycle diagnostics, we need to add checks
for self references too. While multiple roots are an error enforced by
`Validate` for the concurrent walk, they are OK when using
`TransitiveReduction` and `ReverseDepthFirstWalk`, so we can skip that
check.

Apply moves must first use `TransitiveReduction` to reduce the graph,
otherwise nodes may be skipped if they are passed over by a transitive
edge.
2022-01-04 09:21:36 -05:00
..
testdata find implied moves in nested modules 2022-01-04 09:20:47 -05:00
move_execute.go cleanup some move graph handling 2022-01-04 09:21:36 -05:00
move_execute_test.go refactoring: Move nested modules 2021-12-21 16:25:06 -05:00
move_statement.go find implied moves in nested modules 2022-01-04 09:20:47 -05:00
move_statement_test.go find implied moves in nested modules 2022-01-04 09:20:47 -05:00
move_validate.go cleanup some move graph handling 2022-01-04 09:21:36 -05:00
move_validate_test.go check for nested module index changes 2022-01-04 09:20:47 -05:00