vdl: Change vdl tool default lang to just "go"
The other languages need special setup, and shouldn't be run
normally. E.g. running "vdl generate" currently leaves a bunch
of java directories littered around our codebase, in places they
don't actually belong.
Also update vdl/testdata/arith package doc, since it was
out-of-date and misleading. Since we now have a vdl spec, we
don't need this documentation anymore.
Closes vanadium/issues#141
Closes vanadium/issues#162
Change-Id: If209d8d836af593fa4d861e57f94418d3b9a37e6
diff --git a/cmd/vdl/doc.go b/cmd/vdl/doc.go
index f51b087..e977881 100644
--- a/cmd/vdl/doc.go
+++ b/cmd/vdl/doc.go
@@ -85,7 +85,7 @@
Same semantics as --go-out-dir but applies to js code generation.
-js-relative-path-to-core=
If set, this is the relative path from js-out-dir to the root of the JS core
- -lang=Go,Java
+ -lang=Go
Comma-separated list of languages to generate, currently supporting
Go,Java,Javascript
-status=true
@@ -155,7 +155,7 @@
Same semantics as --go-out-dir but applies to js code generation.
-js-relative-path-to-core=
If set, this is the relative path from js-out-dir to the root of the JS core
- -lang=Go,Java
+ -lang=Go
Comma-separated list of languages to generate, currently supporting
Go,Java,Javascript
-status=true
diff --git a/cmd/vdl/main.go b/cmd/vdl/main.go
index 3f57f9c..6caf904 100644
--- a/cmd/vdl/main.go
+++ b/cmd/vdl/main.go
@@ -348,8 +348,8 @@
{"v.io", "io/v"},
}
optPathToJSCore string
- // TODO(bjornick): Add javascript to the default gen langs.
- optGenLangs = genLangs{vdltool.GenLanguageGo, vdltool.GenLanguageJava}
+ // Default to just running the go lang; other langs need special setup.
+ optGenLangs = genLangs{vdltool.GenLanguageGo}
)
// Root returns the root command for the VDL tool.
diff --git a/lib/vdl/testdata/arith/arith.vdl b/lib/vdl/testdata/arith/arith.vdl
index 294e95f..ef28a53 100644
--- a/lib/vdl/testdata/arith/arith.vdl
+++ b/lib/vdl/testdata/arith/arith.vdl
@@ -2,29 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package arith is an example of an IdL definition in vanadium. The syntax for
-// IdL files is similar to, but not identical to, Go. Here are the main
-// concepts:
-// * PACKAGES - Just like in Go you must define the package at the beginning
-// of an IdL file, and everything defined in the file is part of this
-// package. By convention all files in the same dir should be in the same
-// package.
-// * IMPORTS - Just like in Go you can import other idl packages, and you may
-// assign a local package name, or if unspecified the basename of the import
-// path is used as the import package name.
-// * DATA TYPES - Just like in Go you can define data types. You get most of
-// the primitives (int32, float64, string, etc), the "error" built-in, and a
-// special "any" built-in described below. In addition you can create
-// composite types like arrays, structs, etc.
-// * CONSTS - Just like in Go you can define constants, and numerics are
-// "infinite precision" within expressions. Unlike Go numerics must be
-// typed to be used as const definitions or tags.
-// * INTERFACES - Just like in Go you can define interface types, which are
-// just a set of methods. Interfaces can embed other interfaces. Unlike
-// Go, you cannot use an interface as a data type; interfaces are purely
-// method sets.
-// * ERRORS - Errors may be defined in IdL files, and unlike Go they work
-// across separate address spaces.
+// Package arith is a vdl test package with imports.
package arith
// Test the import mechanism.
diff --git a/lib/vdl/testdata/arith/arith.vdl.go b/lib/vdl/testdata/arith/arith.vdl.go
index 3a1502e..c0cd823 100644
--- a/lib/vdl/testdata/arith/arith.vdl.go
+++ b/lib/vdl/testdata/arith/arith.vdl.go
@@ -5,29 +5,7 @@
// This file was auto-generated by the vanadium vdl tool.
// Source: arith.vdl
-// Package arith is an example of an IdL definition in vanadium. The syntax for
-// IdL files is similar to, but not identical to, Go. Here are the main
-// concepts:
-// * PACKAGES - Just like in Go you must define the package at the beginning
-// of an IdL file, and everything defined in the file is part of this
-// package. By convention all files in the same dir should be in the same
-// package.
-// * IMPORTS - Just like in Go you can import other idl packages, and you may
-// assign a local package name, or if unspecified the basename of the import
-// path is used as the import package name.
-// * DATA TYPES - Just like in Go you can define data types. You get most of
-// the primitives (int32, float64, string, etc), the "error" built-in, and a
-// special "any" built-in described below. In addition you can create
-// composite types like arrays, structs, etc.
-// * CONSTS - Just like in Go you can define constants, and numerics are
-// "infinite precision" within expressions. Unlike Go numerics must be
-// typed to be used as const definitions or tags.
-// * INTERFACES - Just like in Go you can define interface types, which are
-// just a set of methods. Interfaces can embed other interfaces. Unlike
-// Go, you cannot use an interface as a data type; interfaces are purely
-// method sets.
-// * ERRORS - Errors may be defined in IdL files, and unlike Go they work
-// across separate address spaces.
+// Package arith is a vdl test package with imports.
package arith
import (