mb0/godt — Issue #5: scan external code on $GOPATH
Author: mb0
Created: 2012-02-20 22:24:39+00:00
State: open

until now i concentrated on implementing the grammar. i had all go code reside in my eclipse workspace for resolution. this is not ideal for many reasons.

parsing and lining additional 1200 files is not fast enough. if we use external code we still need to parse 1200 files but we only need to scan toplevel declaration and only resolve their signature and skip the rest.
we can also manage external files independently of the eclipse workspace build. that means any go file version (by modified date) should only be parsed once. we can also parse the packages lazily when they are referenced for the first time.

with all features considered the user should not see any blocking progressbar when using godt for the first time.
1. the user opens his eclipse and creates a project or opens a go file. godt is loaded and all available packages on the gopath is scanned < 1s
2. the user references one of these packages it will parse and link all dependencies recursively might amount to > 100 files for some packages < 15s at most

regarding conflicts it should first try to resolve to packages inside the workspace and then look for external declarations. that way you can import or copy parts of the go path into your workspace without problems.