veyron2/rt: make it an error and panic if multiple profiles are registered.

MultiPart: 1/2

Change-Id: I77c1f4a3360bf5ab089184c60df6f7466afbc569
diff --git a/profiles/doc.go b/profiles/doc.go
index 3c4ab07..5f5920b 100644
--- a/profiles/doc.go
+++ b/profiles/doc.go
@@ -10,14 +10,10 @@
 //
 // Profiles register themselves by calling veyron2/rt.RegisterProfile in their
 // init function and are hence are chosen by importing them into an
-// applications main package. It is possible, but discouraged, for more
-// specific packages may use functionality exposed by more general packages
-// and rely on go's module dependency algorithm to execute the init function
-// from the more specific package after the less specific one and hence
-// override the earlier Profile registration. This is discouraged because it
-// is harder for the reader to track the dependencies to see what is included
-// by each package. Commonly used functionality is placed in profiles/internal
-// for use by all profiles.
+// applications main package. It is an error to import more than one profile,
+// and the registration mechanism will panic if this is attempted.
+// Commonly used functionality is placed in profiles/internal for use by
+// all profiles.
 //
 // This top level directory contains a 'generic' Profile and utility routines
 // used by other Profiles. It should be imported whenever possible and
diff --git a/tools/vrpc/impl.go b/tools/vrpc/impl.go
index 3133ea4..d057082 100644
--- a/tools/vrpc/impl.go
+++ b/tools/vrpc/impl.go
@@ -7,7 +7,6 @@
 	"time"
 
 	"veyron.io/lib/cmdline"
-	_ "veyron.io/veyron/veyron/profiles/static"
 	idl_test_base "veyron.io/veyron/veyron/tools/vrpc/test_base"
 	"veyron.io/veyron/veyron2"
 	"veyron.io/veyron/veyron2/context"
diff --git a/tools/vrpc/impl_test.go b/tools/vrpc/impl_test.go
index cfbef5d..4204b33 100644
--- a/tools/vrpc/impl_test.go
+++ b/tools/vrpc/impl_test.go
@@ -6,14 +6,15 @@
 	"strings"
 	"testing"
 
-	"veyron.io/lib/cmdline"
-	"veyron.io/veyron/veyron/profiles"
-	"veyron.io/veyron/veyron/tools/vrpc/test_base"
 	"veyron.io/veyron/veyron2"
 	"veyron.io/veyron/veyron2/ipc"
 	"veyron.io/veyron/veyron2/naming"
 	"veyron.io/veyron/veyron2/rt"
 	"veyron.io/veyron/veyron2/vlog"
+
+	"veyron.io/lib/cmdline"
+	"veyron.io/veyron/veyron/profiles"
+	"veyron.io/veyron/veyron/tools/vrpc/test_base"
 )
 
 type server struct{}