resolve/index.go
func (ix *RuleIndex) Finish() {
	for _, r := range ix.rules {
		ix.collectEmbeds(r)
	}
	ix.buildImportIndex()
}
func (ix *RuleIndex) Finish() {
	for _, r := range ix.rules {
		ix.collectEmbeds(r)
	}
	ix.buildImportIndex()
}
// Finish constructs the import index and performs any other necessary indexing
// actions after all rules have been added. This step is necessary because
// a rule may be indexed differently based on what rules are added later.
//
// Finish must be called after all AddRule calls and before any
// FindRulesByImport calls.