Skip to content

Commit d4f29fa

Browse files
committed
More progress on java imports
Signed-off-by: James Hamlin <jfhamlin@gmail.com>
1 parent 9f8bc73 commit d4f29fa

31 files changed

+599
-564
lines changed

pkg/codegen/TODO.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77

88
Handle
9-
- Exception12 "Exception"
109
- ExceptionInfo15 "ExceptionInfo"
1110
- LinkedBlockingQueue28 "LinkedBlockingQueue"
1211
- Object16 "Object"
@@ -20,4 +19,3 @@ Handle
2019
- java.util.concurrent.CountDownLatch25 "java.util.concurrent.CountDownLatch"
2120
- java.util.concurrent8 "java.util.concurrent"
2221
- java.util22 "java.util"
23-
- lang1 "github.com/glojurelang/glojure/pkg/lang"

pkg/codegen/codegen.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ func (g *Generator) Generate(ns *lang.Namespace) error {
8989
var varsBuf bytes.Buffer
9090
g.w = &varsBuf
9191

92+
// add lang import
93+
g.addImport("github.com/glojurelang/glojure/pkg/lang")
94+
9295
g.writef(" ns := lang.FindOrCreateNamespace(lang.NewSymbol(%#v))\n", ns.Name().String())
9396
g.writef(" _ = ns\n")
9497

@@ -1285,7 +1288,6 @@ func (g *Generator) header() string {
12851288
package generated
12861289
12871290
import (
1288-
"github.com/glojurelang/glojure/pkg/lang"
12891291
`
12901292

12911293
// sort the imports by their package name for deterministic output

pkg/codegen/testdata/codegen/test/const_keyword.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/codegen/testdata/codegen/test/const_number.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/codegen/testdata/codegen/test/const_string.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)