Index: mojom/mojom_parser/mojom/mojom_descriptor.go |
diff --git a/mojom/mojom_parser/mojom/mojom_descriptor.go b/mojom/mojom_parser/mojom/mojom_descriptor.go |
index 4ecac5fb01fa75d4122e2a846e18f348660629cd..3109654c9aeacef0b48ccc93e1737e131dbd5ce3 100644 |
--- a/mojom/mojom_parser/mojom/mojom_descriptor.go |
+++ b/mojom/mojom_parser/mojom/mojom_descriptor.go |
@@ -474,14 +474,16 @@ func computeTypeKey(fullyQualifiedName string) (typeKey string) { |
if typeKey, ok := fqnToTypeKey[fullyQualifiedName]; ok == true { |
return typeKey |
} |
- typeKey = fmt.Sprintf("%d", nextKey) |
- nextKey++ |
+ // TODO(rudominer) Until we understand better what the requirements are for a type key |
+ // let's just use the fully-qualified name itself, with a prefix prepended, as the type key. |
+ // The reason or the prefix is pragmatic: When debugging we can tell whether a string |
+ // is a type key or a fully-qualified-name. |
+ typeKey = fmt.Sprintf("TYPE_KEY:%s", fullyQualifiedName) |
fqnToTypeKey[fullyQualifiedName] = typeKey |
return |
} |
var fqnToTypeKey map[string]string |
-var nextKey int |
func init() { |
fqnToTypeKey = make(map[string]string) |