Questions, suggestions, issues, and PRs are welcome.
Main components:
- CLI
- Location:
[cmd](https://godoc.org/github.com/codeactual/transplant/cmd)
- Location:
- API (internal-only)
[internal/transplant](https://godoc.org/github.com/codeactual/transplant/internal/transplant)
Audit
andCopier
types
- Shared first-party dependencies
internal/cage/go/packages
Inspector
type
- Third-party dependencies
x/tools/go/packages
provides the package and AST analysis.internal/cage/go/packages
wraps a lot ofx/tools/go/packages
functionality in itsInspector
.Audit
relies onInspector
to produce analysis specific to transplant's business logic. And finallyCopier
relies on theAudit
results to peform the file processing and copying logic.
- To reduce the per-test boilerplate, the base suite includes some "magic" that may be useful before adding a new test.
- Why does the CLI name its primary commands "export/import" while most of the code calls those modes "egress/ingress"?
- To avoid the ambiguity and search-pollution related to import mode versus an
import
statement, name, package, path, etc. Also, "import" cannot be used as an import name.
- To avoid the ambiguity and search-pollution related to import mode versus an
- Why is a directed acyclic graph generated but not really used?
- An earlier version used them for pruning decisions. They have not been refactored out due to plans to enhance the
[why](cli.md)
commands with some degree of support for globals.
- An earlier version used them for pruning decisions. They have not been refactored out due to plans to enhance the
- Why are there references to "auto-detect", especially in tests and fixtures?
- Originally the
[GoFilePath](config.md#structure)
fields was namedAutoDetectFilePath
and those files are not yet refactored.
- Originally the
- Why do all
go.mod
fixtures use an oldgo 1.12
? And how do the tests still pass?- Tests which compare directory contents use the
DirsMatchExceptGomod
method of their suite. The method ensures that the dynamicgo
directive is effectively ignored as long as the expectation-fixture containsgo 1.12
(picked arbitrarily because this workaround was added during a migration to1.13
).
- Tests which compare directory contents use the