diff --git a/extractor/dbscheme/dbscheme.go b/extractor/dbscheme/dbscheme.go index fddaa3e6e1f..923fda859db 100644 --- a/extractor/dbscheme/dbscheme.go +++ b/extractor/dbscheme/dbscheme.go @@ -272,6 +272,11 @@ func IntColumn(columnName string) Column { return Column{columnName, INT, false, true} } +// FloatColumn constructs a column with name `columnName` holding floating point number values +func FloatColumn(columnName string) Column { + return Column{columnName, FLOAT, false, true} +} + // A Table represents a database table type Table struct { name string diff --git a/extractor/dbscheme/tables.go b/extractor/dbscheme/tables.go index 233f087a2b1..0a968fd8ecd 100644 --- a/extractor/dbscheme/tables.go +++ b/extractor/dbscheme/tables.go @@ -120,6 +120,130 @@ xmllocations( @xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; `) +// Compiler diagnostic tables +var CompilationType = NewPrimaryKeyType("@compilation") + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * go build a.go b.go c.go + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +var CompilationsTable = NewTable("compilations", + EntityColumn(CompilationType, "id").Key(), + StringColumn("cwd"), +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * go build a.go b.go c.go + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--` + * 2 | a.go + * 3 | b.go + * 4 | c.go + */ +var CompilationArgsTable = NewTable("compilation_args", + EntityColumn(CompilationType, "id"), + IntColumn("num"), + StringColumn("arg"), +).KeySet("id", "num") + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * go build a.go b.go c.go + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | a.go + * 1 | b.go + * 2 | c.go + */ +var CompilationCompilingFilesTable = NewTable("compilation_compiling_files", + EntityColumn(CompilationType, "id"), + IntColumn("num"), + EntityColumn(FileType, "file"), +).KeySet("id", "num") + +type CompilationTypeKind int + +const ( + FRONTEND_CPU_SECONDS = iota + FRONTEND_ELAPSED_SECONDS + EXTRACTOR_CPU_SECONDS + EXTRACTOR_ELAPSED_SECONDS +) + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +var CompilationTimeTable = NewTable("compilation_time", + EntityColumn(CompilationType, "id"), + IntColumn("num"), + IntColumn("kind"), + FloatColumn("secs"), +).KeySet("id", "num", "kind") + +var DiagnosticType = NewPrimaryKeyType("@diagnostic") + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +var DiagnosticForTable = NewTable("diagnostic_for", + EntityColumn(DiagnosticType, "diagnostic").Unique(), + EntityColumn(CompilationType, "compilation"), + IntColumn("file_number"), + IntColumn("file_number_diagnostic_number"), +) + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +var CompilationFinishedTable = NewTable("compilation_finished", + EntityColumn(CompilationType, "id").Unique(), + FloatColumn("cpu_seconds"), + FloatColumn("elapsed_seconds"), +) + +var DiagnosticsTable = NewTable("diagnostics", + EntityColumn(DiagnosticType, "id").Key(), + IntColumn("severity"), + StringColumn("error_tag"), + StringColumn("error_message"), + StringColumn("full_error_message"), + EntityColumn(LocationType, "location"), +) + // ContainerType is the type of files and folders var ContainerType = NewUnionType("@container") @@ -742,6 +866,14 @@ var ErrorTypes = map[packages.ErrorKind]*BranchType{ packages.TypeError: ErrorKind.NewBranch("@typeerror"), } +// ErrorTypes is a map from error kinds to the corresponding tag +var ErrorTags = map[packages.ErrorKind]string{ + packages.UnknownError: "@unknownerror", + packages.ListError: "@listerror", + packages.ParseError: "@parseerror", + packages.TypeError: "@typeerror", +} + // LocationsDefaultTable is the table defining location objects var LocationsDefaultTable = NewTable("locations_default", EntityColumn(LocationDefaultType, "id").Key(), diff --git a/extractor/extractor.go b/extractor/extractor.go index 290fd026d74..29bc0764b67 100644 --- a/extractor/extractor.go +++ b/extractor/extractor.go @@ -1,12 +1,15 @@ package extractor import ( + "crypto/md5" + "encoding/hex" "fmt" "go/ast" "go/constant" "go/scanner" "go/token" "go/types" + "io" "io/ioutil" "log" "os" @@ -25,6 +28,33 @@ import ( "golang.org/x/tools/go/packages" ) +var MaxGoRoutines int + +func init() { + // this sets the number of threads that the Go runtime will spawn; this is separate + // from the number of goroutines that the program spawns, which are scheduled into + // the system threads by the Go runtime scheduler + threads := os.Getenv("LGTM_THREADS") + if maxprocs, err := strconv.Atoi(threads); err == nil && maxprocs > 0 { + log.Printf("Max threads set to %d", maxprocs) + runtime.GOMAXPROCS(maxprocs) + } else if threads != "" { + log.Printf("Warning: LGTM_THREADS value %s is not valid, defaulting to using all available threads.", threads) + } + // if the value is empty or not set, use the Go default, which is the number of cores + // available since Go 1.5, but is subject to change + + var err error + if MaxGoRoutines, err = strconv.Atoi(util.Getenv( + "CODEQL_EXTRACTOR_GO_MAX_GOROUTINES", + "SEMMLE_MAX_GOROUTINES", + )); err != nil { + MaxGoRoutines = 32 + } else { + log.Printf("Max goroutines set to %d", MaxGoRoutines) + } +} + // Extract extracts the packages specified by the given patterns func Extract(patterns []string) error { return ExtractWithFlags(nil, patterns) @@ -32,6 +62,11 @@ func Extract(patterns []string) error { // ExtractWithFlags extracts the packages specified by the given patterns and build flags func ExtractWithFlags(buildFlags []string, patterns []string) error { + startTime := time.Now() + + extraction := NewExtraction(buildFlags, patterns) + defer extraction.StatWriter.Close() + modEnabled := os.Getenv("GO111MODULE") != "off" if !modEnabled { log.Println("Go module mode disabled.") @@ -111,7 +146,7 @@ func ExtractWithFlags(buildFlags []string, patterns []string) error { log.Printf("Warning: encountered errors extracting package `%s`:", pkg.PkgPath) for i, err := range pkg.Errors { log.Printf(" %s", err.Error()) - extractError(tw, err, lbl, i) + extraction.extractError(tw, err, lbl, i) } } log.Printf("Done extracting types for package %s.", pkg.PkgPath) @@ -129,38 +164,6 @@ func ExtractWithFlags(buildFlags []string, patterns []string) error { log.Println("Starting to extract packages.") - // this sets the number of threads that the Go runtime will spawn; this is separate - // from the number of goroutines that the program spawns, which are scheduled into - // the system threads by the Go runtime scheduler - threads := os.Getenv("LGTM_THREADS") - if maxprocs, err := strconv.Atoi(threads); err == nil && maxprocs > 0 { - log.Printf("Max threads set to %d", maxprocs) - runtime.GOMAXPROCS(maxprocs) - } else if threads != "" { - log.Printf("Warning: LGTM_THREADS value %s is not valid, defaulting to using all available threads.", threads) - } - // if the value is empty or not set, use the Go default, which is the number of cores - // available since Go 1.5, but is subject to change - - var maxgoroutines int - if maxgoroutines, err = strconv.Atoi(util.Getenv( - "CODEQL_EXTRACTOR_GO_MAX_GOROUTINES", - "SEMMLE_MAX_GOROUTINES", - )); err != nil { - maxgoroutines = 32 - } else { - log.Printf("Max goroutines set to %d", maxgoroutines) - } - - var wg sync.WaitGroup - // this semaphore is used to limit the number of files that are open at once; - // this is to prevent the extractor from running into issues with caps on the - // number of open files that can be held by one process - fdSem := newSemaphore(100) - // this semaphore is used to limit the number of goroutines spawned, so we - // don't run into memory issues - goroutineSem := newSemaphore(maxgoroutines) - sep := regexp.QuoteMeta(string(filepath.Separator)) // if a path matches this regexp, we don't want to extract this package. Currently, it checks // - that the path does not contain a `..` segment, and @@ -178,7 +181,7 @@ func ExtractWithFlags(buildFlags []string, patterns []string) error { continue } - extractPackage(pkg, &wg, goroutineSem, fdSem) + extraction.extractPackage(pkg) if pkgRoots[pkg.PkgPath] != "" { modPath := filepath.Join(pkgRoots[pkg.PkgPath], "go.mod") @@ -186,7 +189,7 @@ func ExtractWithFlags(buildFlags []string, patterns []string) error { log.Printf("Extracting %s", modPath) start := time.Now() - err := extractGoMod(modPath) + err := extraction.extractGoMod(modPath) if err != nil { log.Printf("Failed to extract go.mod: %s", err.Error()) } @@ -202,13 +205,133 @@ func ExtractWithFlags(buildFlags []string, patterns []string) error { log.Printf("Skipping dependency package %s.", pkg.PkgPath) }) - wg.Wait() + extraction.WaitGroup.Wait() log.Println("Done extracting packages.") + t := time.Now() + elapsed := t.Sub(startTime) + dbscheme.CompilationFinishedTable.Emit(extraction.StatWriter, extraction.Label, 0.0, elapsed.Seconds()) + return nil } +type Extraction struct { + // A lock for preventing concurrent writes to maps and the stat trap writer, as they are not + // thread-safe + Lock sync.Mutex + LabelKey string + Label trap.Label + StatWriter *trap.Writer + WaitGroup sync.WaitGroup + GoroutineSem *semaphore + FdSem *semaphore + NextFileId int + FileInfo map[string]*FileInfo + SeenGoMods map[string]bool +} + +type FileInfo struct { + Idx int + NextErr int +} + +func (extraction *Extraction) GetFileInfo(path string) *FileInfo { + if fileInfo, ok := extraction.FileInfo[path]; ok { + return fileInfo + } + + extraction.FileInfo[path] = &FileInfo{extraction.NextFileId, 0} + extraction.NextFileId += 1 + + return extraction.FileInfo[path] +} + +func (extraction *Extraction) GetFileIdx(path string) int { + return extraction.GetFileInfo(path).Idx +} + +func (extraction *Extraction) GetNextErr(path string) int { + finfo := extraction.GetFileInfo(path) + res := finfo.NextErr + finfo.NextErr += 1 + return res +} + +func NewExtraction(buildFlags []string, patterns []string) *Extraction { + hash := md5.New() + io.WriteString(hash, "go") + for _, buildFlag := range buildFlags { + io.WriteString(hash, " "+buildFlag) + } + io.WriteString(hash, " --") + for _, pattern := range patterns { + io.WriteString(hash, " "+pattern) + } + sum := hash.Sum(nil) + + i := 0 + var path string + // split compilation files into directories to avoid filling a single directory with too many files + pathFmt := fmt.Sprintf("compilations/%s/%s_%%d", hex.EncodeToString(sum[:1]), hex.EncodeToString(sum[1:])) + for { + path = fmt.Sprintf(pathFmt, i) + file, err := trap.FileFor(path) + if err != nil { + log.Fatalf("Error creating trap file: %s\n", err.Error()) + } + i++ + + if !util.FileExists(file) { + break + } + } + + statWriter, err := trap.NewWriter(path, nil) + if err != nil { + log.Fatal(err) + } + lblKey := fmt.Sprintf("%s_%d;compilation", hex.EncodeToString(sum), i) + lbl := statWriter.Labeler.GlobalID(lblKey) + + wd, err := os.Getwd() + if err != nil { + log.Fatalf("Unable to determine current directory: %s\n", err.Error()) + } + + dbscheme.CompilationsTable.Emit(statWriter, lbl, wd) + i = 0 + dbscheme.CompilationArgsTable.Emit(statWriter, lbl, 0, util.GetExtractorPath()) + i++ + for _, flag := range buildFlags { + dbscheme.CompilationArgsTable.Emit(statWriter, lbl, i, flag) + i++ + } + // emit a fake "--" argument to make it clear that what comes after it are patterns + dbscheme.CompilationArgsTable.Emit(statWriter, lbl, i, "--") + i++ + for _, pattern := range patterns { + dbscheme.CompilationArgsTable.Emit(statWriter, lbl, i, pattern) + i++ + } + + return &Extraction{ + LabelKey: lblKey, + Label: lbl, + StatWriter: statWriter, + // this semaphore is used to limit the number of files that are open at once; + // this is to prevent the extractor from running into issues with caps on the + // number of open files that can be held by one process + FdSem: newSemaphore(100), + // this semaphore is used to limit the number of goroutines spawned, so we + // don't run into memory issues + GoroutineSem: newSemaphore(MaxGoRoutines), + NextFileId: 0, + FileInfo: make(map[string]*FileInfo), + SeenGoMods: make(map[string]bool), + } +} + // extractUniverseScope extracts symbol table information for the universe scope func extractUniverseScope() { tw, err := trap.NewWriter("universe", nil) @@ -315,9 +438,10 @@ var ( ) // extractError extracts the message and location of a frontend error -func extractError(tw *trap.Writer, err packages.Error, pkglbl trap.Label, idx int) { +func (extraction *Extraction) extractError(tw *trap.Writer, err packages.Error, pkglbl trap.Label, idx int) { var ( lbl = tw.Labeler.FreshID() + tag = dbscheme.ErrorTags[err.Kind] kind = dbscheme.ErrorTypes[err.Kind].Index() pos = err.Pos file = "" @@ -347,23 +471,42 @@ func extractError(tw *trap.Writer, err packages.Error, pkglbl trap.Label, idx in } else if pos != "" && pos != "-" { log.Printf("Warning: malformed error position `%s`", pos) } - file = filepath.ToSlash(srcarchive.TransformPath(file)) - dbscheme.ErrorsTable.Emit(tw, lbl, kind, err.Msg, pos, file, line, col, pkglbl, idx) + afile, e := filepath.Abs(file) + if e != nil { + log.Printf("Warning: failed to get absolute path for for %s", file) + afile = file + } + ffile, e := filepath.EvalSymlinks(afile) + if e != nil { + log.Printf("Warning: failed to evaluate symlinks for %s", afile) + ffile = afile + } + transformed := filepath.ToSlash(srcarchive.TransformPath(ffile)) + + extraction.Lock.Lock() + diagLbl := extraction.StatWriter.Labeler.FreshID() + dbscheme.DiagnosticsTable.Emit(extraction.StatWriter, diagLbl, 1, tag, err.Msg, err.Msg, + emitLocation( + extraction.StatWriter, extraction.StatWriter.Labeler.GlobalID(ffile+";sourcefile"), + line, col, line, col, + )) + dbscheme.DiagnosticForTable.Emit(extraction.StatWriter, diagLbl, extraction.Label, extraction.GetFileIdx(transformed), extraction.GetNextErr(transformed)) + extraction.Lock.Unlock() + dbscheme.ErrorsTable.Emit(tw, lbl, kind, err.Msg, pos, transformed, line, col, pkglbl, idx) } // extractPackage extracts AST information for all files in the given package -func extractPackage(pkg *packages.Package, wg *sync.WaitGroup, - goroutineSem *semaphore, fdSem *semaphore) { +func (extraction *Extraction) extractPackage(pkg *packages.Package) { for _, astFile := range pkg.Syntax { - wg.Add(1) - goroutineSem.acquire(1) + extraction.WaitGroup.Add(1) + extraction.GoroutineSem.acquire(1) go func(astFile *ast.File) { - err := extractFile(astFile, pkg, fdSem) + err := extraction.extractFile(astFile, pkg) if err != nil { log.Fatal(err) } - goroutineSem.release(1) - wg.Done() + extraction.GoroutineSem.release(1) + extraction.WaitGroup.Done() }(astFile) } } @@ -379,7 +522,7 @@ func normalizedPath(ast *ast.File, fset *token.FileSet) string { } // extractFile extracts AST information for the given file -func extractFile(ast *ast.File, pkg *packages.Package, fdSem *semaphore) error { +func (extraction *Extraction) extractFile(ast *ast.File, pkg *packages.Package) error { fset := pkg.Fset if ast.Package == token.NoPos { log.Printf("Skipping extracting a file without a 'package' declaration") @@ -387,26 +530,26 @@ func extractFile(ast *ast.File, pkg *packages.Package, fdSem *semaphore) error { } path := normalizedPath(ast, fset) - fdSem.acquire(3) + extraction.FdSem.acquire(3) log.Printf("Extracting %s", path) start := time.Now() - defer fdSem.release(1) + defer extraction.FdSem.release(1) tw, err := trap.NewWriter(path, pkg) if err != nil { - fdSem.release(2) + extraction.FdSem.release(2) return err } defer tw.Close() err = srcarchive.Add(path) - fdSem.release(2) + extraction.FdSem.release(2) if err != nil { return err } - extractFileInfo(tw, path) + extraction.extractFileInfo(tw, path) extractScopes(tw, ast, pkg) @@ -433,7 +576,7 @@ func stemAndExt(base string) (string, string) { // extractFileInfo extracts file-system level information for the given file, populating // the `files` and `containerparent` tables -func extractFileInfo(tw *trap.Writer, file string) { +func (extraction *Extraction) extractFileInfo(tw *trap.Writer, file string) { path := filepath.ToSlash(srcarchive.TransformPath(file)) components := strings.Split(path, "/") parentPath := "" @@ -454,6 +597,9 @@ func extractFileInfo(tw *trap.Writer, file string) { dbscheme.FilesTable.Emit(tw, lbl, path, stem, ext, 0) dbscheme.ContainerParentTable.Emit(tw, parentLbl, lbl) extractLocation(tw, lbl, 0, 0, 0, 0) + extraction.Lock.Lock() + dbscheme.CompilationCompilingFilesTable.Emit(extraction.StatWriter, extraction.Label, extraction.GetFileIdx(path), extraction.StatWriter.Labeler.FileLabelFor(tw)) + extraction.Lock.Unlock() break } lbl := tw.Labeler.GlobalID(path + ";folder") @@ -470,10 +616,16 @@ func extractFileInfo(tw *trap.Writer, file string) { // extractLocation emits a location entity for the given entity func extractLocation(tw *trap.Writer, entity trap.Label, sl int, sc int, el int, ec int) { - lbl := tw.Labeler.FileLabel() - locLbl := tw.Labeler.GlobalID(fmt.Sprintf("loc,{%s},%d,%d,%d,%d", lbl.String(), sl, sc, el, ec)) - dbscheme.LocationsDefaultTable.Emit(tw, locLbl, lbl, sl, sc, el, ec) - dbscheme.HasLocationTable.Emit(tw, entity, locLbl) + filelbl := tw.Labeler.FileLabel() + dbscheme.HasLocationTable.Emit(tw, entity, emitLocation(tw, filelbl, sl, sc, el, ec)) +} + +// emitLocation emits a location entity +func emitLocation(tw *trap.Writer, filelbl trap.Label, sl int, sc int, el int, ec int) trap.Label { + locLbl := tw.Labeler.GlobalID(fmt.Sprintf("loc,{%s},%d,%d,%d,%d", filelbl, sl, sc, el, ec)) + dbscheme.LocationsDefaultTable.Emit(tw, locLbl, filelbl, sl, sc, el, ec) + + return locLbl } // extractNodeLocation extracts location information for the given node diff --git a/extractor/gomodextractor.go b/extractor/gomodextractor.go index ebf6e268b93..5a6a26281bc 100644 --- a/extractor/gomodextractor.go +++ b/extractor/gomodextractor.go @@ -14,11 +14,20 @@ import ( "github.com/github/codeql-go/extractor/trap" ) -func extractGoMod(path string) error { +func (extraction *Extraction) extractGoMod(path string) error { if normPath, err := filepath.EvalSymlinks(path); err == nil { path = normPath } + extraction.Lock.Lock() + if extraction.SeenGoMods[path] { + extraction.Lock.Unlock() + return nil + } + + extraction.SeenGoMods[path] = true + extraction.Lock.Unlock() + tw, err := trap.NewWriter(path, nil) if err != nil { return err @@ -30,7 +39,7 @@ func extractGoMod(path string) error { return err } - extractFileInfo(tw, path) + extraction.extractFileInfo(tw, path) file, err := os.Open(path) if err != nil { diff --git a/extractor/trap/labels.go b/extractor/trap/labels.go index d6bce8b5bb5..bbbb6dfb73d 100644 --- a/extractor/trap/labels.go +++ b/extractor/trap/labels.go @@ -70,6 +70,11 @@ func (l *Labeler) FileLabel() Label { return l.fileLabel } +// FileLabelFor returns the label for the file for which the trap writer `tw` is associated +func (l *Labeler) FileLabelFor(tw *Writer) Label { + return l.GlobalID(tw.path + ";sourcefile") +} + // LocalID associates a label with the given AST node `nd` and returns it func (l *Labeler) LocalID(nd interface{}) Label { label, exists := l.nodeLabels[nd] diff --git a/extractor/trap/trapwriter.go b/extractor/trap/trapwriter.go index aadc04f9f48..ff96defa3bd 100644 --- a/extractor/trap/trapwriter.go +++ b/extractor/trap/trapwriter.go @@ -26,14 +26,22 @@ type Writer struct { Package *packages.Package } +func FileFor(path string) (string, error) { + trapFolder, err := trapFolder() + if err != nil { + return "", err + } + + return filepath.Join(trapFolder, srcarchive.AppendablePath(path)+".trap.gz"), nil +} + // NewWriter creates a TRAP file for the given path and returns a writer for // writing to it func NewWriter(path string, pkg *packages.Package) (*Writer, error) { - trapFolder, err := trapFolder() + trapFilePath, err := FileFor(path) if err != nil { return nil, err } - trapFilePath := filepath.Join(trapFolder, srcarchive.AppendablePath(path)+".trap.gz") trapFileDir := filepath.Dir(trapFilePath) err = os.MkdirAll(trapFileDir, 0755) if err != nil { @@ -133,6 +141,8 @@ func (tw *Writer) Emit(table string, values []interface{}) error { fmt.Fprintf(tw.zip, "\"%s\"", escapeString(capStringLength(value))) case int: fmt.Fprintf(tw.zip, "%d", value) + case float64: + fmt.Fprintf(tw.zip, "%e", value) default: return errors.New("Cannot emit value") } diff --git a/extractor/util/util.go b/extractor/util/util.go index 0c607202ae7..a5c5227eee6 100644 --- a/extractor/util/util.go +++ b/extractor/util/util.go @@ -8,6 +8,8 @@ import ( "strings" ) +var extractorPath string + // Getenv retrieves the value of the environment variable named by the key. // If that variable is not present, it iterates over the given aliases until // it finds one that is. If none are present, the empty string is returned. @@ -138,3 +140,21 @@ func RunCmd(cmd *exec.Cmd) bool { return true } + +func GetExtractorPath() string { + if extractorPath != "" { + return extractorPath + } + + root, set := os.LookupEnv("CODEQL_EXTRACTOR_GO_ROOT") + if !set { + log.Fatal("CODEQL_EXTRACTOR_GO_ROOT not set; this binary should be run from the `codeql` CLI.") + } + platform, set := os.LookupEnv("CODEQL_PLATFORM") + if !set { + log.Fatal("CODEQL_PLATFORM not set; this binary should be run from the `codeql` CLI.") + } + + extractorPath = filepath.Join(root, "tools", platform, "go-extractor") + return extractorPath +} diff --git a/ql/src/go.dbscheme b/ql/src/go.dbscheme index 2e92b436892..b37faf5d62c 100644 --- a/ql/src/go.dbscheme +++ b/ql/src/go.dbscheme @@ -110,6 +110,24 @@ xmllocations( @xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; +compilations(unique int id: @compilation, string cwd: string ref); + +#keyset[id, num] +compilation_args(int id: @compilation ref, int num: int ref, string arg: string ref); + +#keyset[id, num, kind] +compilation_time(int id: @compilation ref, int num: int ref, int kind: int ref, float secs: float ref); + +diagnostic_for(unique int diagnostic: @diagnostic ref, int compilation: @compilation ref, int file_number: int ref, int file_number_diagnostic_number: int ref); + +compilation_finished(unique int id: @compilation ref, float cpu_seconds: float ref, float elapsed_seconds: float ref); + +#keyset[id, num] +compilation_compiling_files(int id: @compilation ref, int num: int ref, int file: @file ref); + +diagnostics(unique int id: @diagnostic, int severity: int ref, string error_tag: string ref, string error_message: string ref, + string full_error_message: string ref, int location: @location ref); + locations_default(unique int id: @location_default, int file: @file ref, int beginLine: int ref, int beginColumn: int ref, int endLine: int ref, int endColumn: int ref); diff --git a/ql/src/go.dbscheme.stats b/ql/src/go.dbscheme.stats index c21daa01502..4a1886f84c2 100644 --- a/ql/src/go.dbscheme.stats +++ b/ql/src/go.dbscheme.stats @@ -1,36 +1,64 @@ + + @similarity + 0 + @duplication 0 - @similarity + @xmldtd 0 + + @xmlelement + 504 + + + @xmlattribute + 408 + @externalDataElement 0 - @location_default - 537408 + @xmlnamespace + 0 + + + @xmlcomment + 30 + + + @xmlcharacters + 869 + + + @compilation + 1 + + + @diagnostic + 0 @file - 523 + 529 @folder - 223 + 210 @comment_group - 12094 + 12083 @slashslashcomment - 24891 + 24878 @slashstarcomment @@ -248,6 +276,10 @@ @field 19974 + + @location_default + 539178 + @declstmt 1454 @@ -442,7 +474,7 @@ @packagescope - 341 + 346 @localscope @@ -454,7 +486,7 @@ @decltypeobject - 3499 + 3602 @builtintypeobject @@ -462,7 +494,7 @@ @declconstobject - 8489 + 8857 @builtinconstobject @@ -470,11 +502,11 @@ @declvarobject - 50367 + 51098 @declfunctionobject - 17257 + 17793 @builtinfunctionobject @@ -586,23 +618,23 @@ @arraytype - 292 + 293 @slicetype - 617 + 637 @structtype - 2339 + 2409 @pointertype - 1861 + 1903 @interfacetype - 232 + 247 @tupletype @@ -610,11 +642,11 @@ @signaturetype - 7772 + 8010 @maptype - 416 + 430 @sendchantype @@ -626,11 +658,11 @@ @sendrcvchantype - 30 + 29 @namedtype - 3471 + 3567 @complexliteraltype @@ -638,27 +670,27 @@ @package - 341 - - - @modcommentblock - 3 + 346 @modline - 32 + 6 @modlineblock - 2 + 1 @modlparen - 2 + 1 @modrparen - 2 + 1 + + + @modcommentblock + 0 @unknownerror @@ -1361,16 +1393,4814 @@ - locations_default - 537408 + xmlEncoding + 0 id - 537408 + 0 + + + encoding + 0 + + + + + id + encoding + + + 12 + + + 1 + 2 + 1 + + + + + + + encoding + id + + + 12 + + + + + + + + xmlDTDs + 0 + + + id + 0 + + + root + 0 + + + publicId + 0 + + + systemId + 0 + + + fileid + 0 + + + + + id + root + + + 12 + + + 1 + 2 + 1 + + + + + + + id + publicId + + + 12 + + + 1 + 2 + 1 + + + + + + + id + systemId + + + 12 + + + 1 + 2 + 1 + + + + + + + id + fileid + + + 12 + + + 1 + 2 + 1 + + + + + + + root + id + + + 12 + + + + + + root + publicId + + + 12 + + + + + + root + systemId + + + 12 + + + + + + root + fileid + + + 12 + + + + + + publicId + id + + + 12 + + + + + + publicId + root + + + 12 + + + + + + publicId + systemId + + + 12 + + + + + + publicId + fileid + + + 12 + + + + + + systemId + id + + + 12 + + + + + + systemId + root + + + 12 + + + + + + systemId + publicId + + + 12 + + + + + + systemId + fileid + + + 12 + + + + + + fileid + id + + + 12 + + + + + + fileid + root + + + 12 + + + + + + fileid + publicId + + + 12 + + + + + + fileid + systemId + + + 12 + + + + + + + + xmlElements + 504 + + + id + 504 + + + name + 38 + + + parentid + 199 + + + idx + 86 + + + fileid + 14 + + + + + id + name + + + 12 + + + 1 + 2 + 504 + + + + + + + id + parentid + + + 12 + + + 1 + 2 + 504 + + + + + + + id + idx + + + 12 + + + 1 + 2 + 504 + + + + + + + id + fileid + + + 12 + + + 1 + 2 + 504 + + + + + + + name + id + + + 12 + + + 1 + 2 + 11 + + + 2 + 3 + 3 + + + 3 + 4 + 4 + + + 4 + 6 + 3 + + + 7 + 12 + 3 + + + 12 + 14 + 2 + + + 14 + 16 + 3 + + + 16 + 22 + 3 + + + 27 + 40 + 3 + + + 55 + 101 + 3 + + + + + + + name + parentid + + + 12 + + + 1 + 2 + 15 + + + 2 + 3 + 4 + + + 3 + 4 + 4 + + + 4 + 5 + 3 + + + 5 + 6 + 1 + + + 6 + 7 + 3 + + + 7 + 18 + 3 + + + 18 + 22 + 3 + + + 29 + 76 + 2 + + + + + + + name + idx + + + 12 + + + 1 + 2 + 12 + + + 2 + 3 + 4 + + + 3 + 4 + 5 + + + 4 + 5 + 1 + + + 5 + 6 + 3 + + + 6 + 9 + 3 + + + 10 + 11 + 2 + + + 13 + 15 + 3 + + + 15 + 17 + 3 + + + 17 + 41 + 2 + + + + + + + name + fileid + + + 12 + + + 1 + 2 + 18 + + + 2 + 3 + 7 + + + 3 + 4 + 3 + + + 4 + 5 + 1 + + + 5 + 6 + 4 + + + 7 + 11 + 3 + + + 11 + 14 + 2 + + + + + + + parentid + id + + + 12 + + + 1 + 2 + 116 + + + 2 + 3 + 37 + + + 3 + 4 + 22 + + + 4 + 8 + 15 + + + 8 + 61 + 9 + + + + + + + parentid + name + + + 12 + + + 1 + 2 + 160 + + + 2 + 3 + 23 + + + 3 + 8 + 16 + + + + + + + parentid + idx + + + 12 + + + 1 + 2 + 116 + + + 2 + 3 + 37 + + + 3 + 4 + 22 + + + 4 + 8 + 15 + + + 8 + 61 + 9 + + + + + + + parentid + fileid + + + 12 + + + 1 + 2 + 199 + + + + + + + idx + id + + + 12 + + + 1 + 2 + 54 + + + 2 + 3 + 4 + + + 3 + 4 + 11 + + + 4 + 6 + 6 + + + 6 + 21 + 7 + + + 40 + 141 + 4 + + + + + + + idx + name + + + 12 + + + 1 + 2 + 54 + + + 2 + 3 + 5 + + + 3 + 4 + 11 + + + 4 + 5 + 6 + + + 5 + 12 + 7 + + + 14 + 26 + 3 + + + + + + + idx + parentid + + + 12 + + + 1 + 2 + 54 + + + 2 + 3 + 4 + + + 3 + 4 + 11 + + + 4 + 6 + 6 + + + 6 + 21 + 7 + + + 40 + 141 + 4 + + + + + + + idx + fileid + + + 12 + + + 1 + 2 + 54 + + + 2 + 3 + 4 + + + 3 + 4 + 11 + + + 4 + 5 + 8 + + + 5 + 13 + 7 + + + 13 + 15 + 2 + + + + + + + fileid + id + + + 12 + + + 2 + 3 + 1 + + + 7 + 8 + 1 + + + 8 + 9 + 2 + + + 10 + 11 + 1 + + + 16 + 17 + 1 + + + 18 + 19 + 1 + + + 20 + 21 + 1 + + + 21 + 22 + 2 + + + 58 + 59 + 1 + + + 100 + 101 + 1 + + + 107 + 108 + 1 + + + 108 + 109 + 1 + + + + + + + fileid + name + + + 12 + + + 2 + 3 + 1 + + + 3 + 4 + 2 + + + 4 + 5 + 1 + + + 5 + 6 + 2 + + + 6 + 7 + 2 + + + 8 + 9 + 2 + + + 11 + 12 + 1 + + + 16 + 17 + 1 + + + 17 + 18 + 1 + + + 19 + 20 + 1 + + + + + + + fileid + parentid + + + 12 + + + 2 + 3 + 2 + + + 4 + 5 + 1 + + + 6 + 7 + 2 + + + 7 + 8 + 3 + + + 9 + 10 + 1 + + + 10 + 11 + 1 + + + 20 + 21 + 1 + + + 23 + 24 + 1 + + + 47 + 48 + 1 + + + 49 + 50 + 1 + + + + + + + fileid + idx + + + 12 + + + 1 + 2 + 1 + + + 3 + 4 + 2 + + + 4 + 5 + 1 + + + 7 + 8 + 3 + + + 8 + 9 + 1 + + + 13 + 14 + 1 + + + 14 + 15 + 1 + + + 16 + 17 + 1 + + + 30 + 31 + 1 + + + 34 + 35 + 1 + + + 67 + 68 + 1 + + + + + + + + + xmlAttrs + 408 + + + id + 408 + + + elementid + 288 + + + name + 28 + + + value + 235 + + + idx + 6 + + + fileid + 14 + + + + + id + elementid + + + 12 + + + 1 + 2 + 408 + + + + + + + id + name + + + 12 + + + 1 + 2 + 408 + + + + + + + id + value + + + 12 + + + 1 + 2 + 408 + + + + + + + id + idx + + + 12 + + + 1 + 2 + 408 + + + + + + + id + fileid + + + 12 + + + 1 + 2 + 408 + + + + + + + elementid + id + + + 12 + + + 1 + 2 + 195 + + + 2 + 3 + 69 + + + 3 + 4 + 23 + + + 6 + 7 + 1 + + + + + + + elementid + name + + + 12 + + + 1 + 2 + 195 + + + 2 + 3 + 69 + + + 3 + 4 + 23 + + + 6 + 7 + 1 + + + + + + + elementid + value + + + 12 + + + 1 + 2 + 195 + + + 2 + 3 + 70 + + + 3 + 4 + 22 + + + 4 + 5 + 1 + + + + + + + elementid + idx + + + 12 + + + 1 + 2 + 195 + + + 2 + 3 + 69 + + + 3 + 4 + 23 + + + 6 + 7 + 1 + + + + + + + elementid + fileid + + + 12 + + + 1 + 2 + 288 + + + + + + + name + id + + + 12 + + + 1 + 2 + 12 + + + 2 + 3 + 3 + + + 3 + 4 + 4 + + + 5 + 15 + 2 + + + 21 + 22 + 2 + + + 22 + 23 + 2 + + + 45 + 97 + 2 + + + 132 + 133 + 1 + + + + + + + name + elementid + + + 12 + + + 1 + 2 + 12 + + + 2 + 3 + 3 + + + 3 + 4 + 4 + + + 5 + 15 + 2 + + + 21 + 22 + 2 + + + 22 + 23 + 2 + + + 45 + 97 + 2 + + + 132 + 133 + 1 + + + + + + + name + value + + + 12 + + + 1 + 2 + 16 + + + 2 + 3 + 2 + + + 3 + 4 + 3 + + + 11 + 12 + 1 + + + 15 + 16 + 2 + + + 21 + 36 + 2 + + + 41 + 75 + 2 + + + + + + + name + idx + + + 12 + + + 1 + 2 + 19 + + + 2 + 3 + 5 + + + 3 + 4 + 4 + + + + + + + name + fileid + + + 12 + + + 1 + 2 + 18 + + + 2 + 3 + 2 + + + 3 + 4 + 2 + + + 4 + 6 + 2 + + + 10 + 11 + 3 + + + 13 + 14 + 1 + + + + + + + value + id + + + 12 + + + 1 + 2 + 171 + + + 2 + 3 + 32 + + + 3 + 5 + 18 + + + 5 + 13 + 14 + + + + + + + value + elementid + + + 12 + + + 1 + 2 + 174 + + + 2 + 3 + 29 + + + 3 + 5 + 18 + + + 5 + 13 + 14 + + + + + + + value + name + + + 12 + + + 1 + 2 + 230 + + + 2 + 4 + 5 + + + + + + + value + idx + + + 12 + + + 1 + 2 + 224 + + + 2 + 4 + 11 + + + + + + + value + fileid + + + 12 + + + 1 + 2 + 193 + + + 2 + 3 + 32 + + + 3 + 7 + 10 + + + + + + + idx + id + + + 12 + + + 1 + 2 + 3 + + + 24 + 25 + 1 + + + 93 + 94 + 1 + + + 288 + 289 + 1 + + + + + + + idx + elementid + + + 12 + + + 1 + 2 + 3 + + + 24 + 25 + 1 + + + 93 + 94 + 1 + + + 288 + 289 + 1 + + + + + + + idx + name + + + 12 + + + 1 + 2 + 3 + + + 8 + 9 + 1 + + + 14 + 15 + 1 + + + 16 + 17 + 1 + + + + + + + idx + value + + + 12 + + + 1 + 2 + 3 + + + 23 + 24 + 1 + + + 64 + 65 + 1 + + + 157 + 158 + 1 + + + + + + + idx + fileid + + + 12 + + + 1 + 2 + 3 + + + 6 + 7 + 1 + + + 12 + 13 + 1 + + + 14 + 15 + 1 + + + + + + + fileid + id + + + 12 + + + 2 + 3 + 1 + + + 4 + 5 + 1 + + + 10 + 11 + 2 + + + 11 + 12 + 1 + + + 12 + 13 + 1 + + + 17 + 18 + 1 + + + 18 + 19 + 1 + + + 19 + 20 + 1 + + + 22 + 23 + 1 + + + 48 + 49 + 1 + + + 73 + 74 + 2 + + + 89 + 90 + 1 + + + + + + + fileid + elementid + + + 12 + + + 1 + 2 + 1 + + + 4 + 5 + 1 + + + 8 + 9 + 2 + + + 9 + 10 + 1 + + + 11 + 12 + 1 + + + 12 + 13 + 2 + + + 16 + 17 + 1 + + + 17 + 18 + 1 + + + 18 + 19 + 1 + + + 42 + 43 + 1 + + + 63 + 64 + 1 + + + 67 + 68 + 1 + + + + + + + fileid + name + + + 12 + + + 2 + 3 + 2 + + + 3 + 4 + 2 + + + 4 + 5 + 4 + + + 5 + 6 + 1 + + + 6 + 7 + 2 + + + 7 + 8 + 2 + + + 23 + 24 + 1 + + + + + + + fileid + value + + + 12 + + + 2 + 3 + 1 + + + 3 + 4 + 1 + + + 6 + 7 + 1 + + + 8 + 9 + 2 + + + 9 + 10 + 1 + + + 10 + 11 + 1 + + + 13 + 14 + 1 + + + 14 + 15 + 1 + + + 18 + 19 + 1 + + + 32 + 33 + 1 + + + 54 + 55 + 1 + + + 60 + 61 + 1 + + + 61 + 62 + 1 + + + + + + + fileid + idx + + + 12 + + + 1 + 2 + 2 + + + 2 + 3 + 6 + + + 3 + 4 + 5 + + + 6 + 7 + 1 + + + + + + + + + xmlNs + 0 + + + id + 0 + + + prefixName + 0 + + + URI + 0 + + + fileid + 0 + + + + + id + prefixName + + + 12 + + + + + + id + URI + + + 12 + + + + + + id + fileid + + + 12 + + + + + + prefixName + id + + + 12 + + + + + + prefixName + URI + + + 12 + + + + + + prefixName + fileid + + + 12 + + + + + + URI + id + + + 12 + + + + + + URI + prefixName + + + 12 + + + + + + URI + fileid + + + 12 + + + + + + fileid + id + + + 12 + + + + + + fileid + prefixName + + + 12 + + + + + + fileid + URI + + + 12 + + + + + + + + xmlHasNs + 0 + + + elementId + 0 + + + nsId + 0 + + + fileid + 0 + + + + + elementId + nsId + + + 12 + + + + + + elementId + fileid + + + 12 + + + + + + nsId + elementId + + + 12 + + + + + + nsId + fileid + + + 12 + + + + + + fileid + elementId + + + 12 + + + + + + fileid + nsId + + + 12 + + + + + + + + xmlComments + 30 + + + id + 30 + + + text + 18 + + + parentid + 20 + + + fileid + 10 + + + + + id + text + + + 12 + + + 1 + 2 + 30 + + + + + + + id + parentid + + + 12 + + + 1 + 2 + 30 + + + + + + + id + fileid + + + 12 + + + 1 + 2 + 30 + + + + + + + text + id + + + 12 + + + 1 + 2 + 13 + + + 2 + 3 + 3 + + + 4 + 5 + 1 + + + 7 + 8 + 1 + + + + + + + text + parentid + + + 12 + + + 1 + 2 + 14 + + + 2 + 3 + 2 + + + 4 + 5 + 1 + + + 7 + 8 + 1 + + + + + + + text + fileid + + + 12 + + + 1 + 2 + 15 + + + 2 + 3 + 2 + + + 7 + 8 + 1 + + + + + + + parentid + id + + + 12 + + + 1 + 2 + 15 + + + 2 + 3 + 3 + + + 4 + 5 + 1 + + + 5 + 6 + 1 + + + + + + + parentid + text + + + 12 + + + 1 + 2 + 15 + + + 2 + 3 + 3 + + + 3 + 4 + 1 + + + 5 + 6 + 1 + + + + + + + parentid + fileid + + + 12 + + + 1 + 2 + 20 + + + + + + + fileid + id + + + 12 + + + 1 + 2 + 6 + + + 2 + 3 + 1 + + + 4 + 5 + 1 + + + 8 + 9 + 1 + + + 10 + 11 + 1 + + + + + + + fileid + text + + + 12 + + + 1 + 2 + 6 + + + 2 + 3 + 1 + + + 4 + 5 + 1 + + + 5 + 6 + 1 + + + 9 + 10 + 1 + + + + + + + fileid + parentid + + + 12 + + + 1 + 2 + 7 + + + 3 + 4 + 1 + + + 5 + 6 + 2 + + + + + + + + + xmlChars + 869 + + + id + 869 + + + text + 427 + + + parentid + 432 + + + idx + 87 + + + isCDATA + 1 + + + fileid + 14 + + + + + id + text + + + 12 + + + 1 + 2 + 869 + + + + + + + id + parentid + + + 12 + + + 1 + 2 + 869 + + + + + + + id + idx + + + 12 + + + 1 + 2 + 869 + + + + + + + id + isCDATA + + + 12 + + + 1 + 2 + 869 + + + + + + + id + fileid + + + 12 + + + 1 + 2 + 869 + + + + + + + text + id + + + 12 + + + 1 + 2 + 339 + + + 2 + 3 + 53 + + + 3 + 49 + 33 + + + 68 + 90 + 2 + + + + + + + text + parentid + + + 12 + + + 1 + 2 + 342 + + + 2 + 3 + 50 + + + 3 + 28 + 33 + + + 28 + 32 + 2 + + + + + + + text + idx + + + 12 + + + 1 + 2 + 400 + + + 2 + 58 + 27 + + + + + + + text + isCDATA + + + 12 + + + 1 + 2 + 427 + + + + + + + text + fileid + + + 12 + + + 1 + 2 + 380 + + + 2 + 4 + 36 + + + 4 + 11 + 11 + + + + + + + parentid + id + + + 12 + + + 1 + 2 + 302 + + + 2 + 3 + 53 + + + 3 + 4 + 28 + + + 4 + 7 + 34 + + + 7 + 60 + 15 + + + + + + + parentid + text + + + 12 + + + 1 + 2 + 314 + + + 2 + 3 + 67 + + + 3 + 5 + 37 + + + 5 + 26 + 14 + + + + + + + parentid + idx + + + 12 + + + 1 + 2 + 302 + + + 2 + 3 + 53 + + + 3 + 4 + 28 + + + 4 + 7 + 34 + + + 7 + 60 + 15 + + + + + + + parentid + isCDATA + + + 12 + + + 1 + 2 + 432 + + + + + + + parentid + fileid + + + 12 + + + 1 + 2 + 432 + + + + + + + idx + id + + + 12 + + + 1 + 2 + 55 + + + 2 + 3 + 3 + + + 3 + 4 + 11 + + + 4 + 7 + 7 + + + 8 + 28 + 7 + + + 41 + 408 + 4 + + + + + + + idx + text + + + 12 + + + 1 + 2 + 55 + + + 2 + 3 + 3 + + + 3 + 4 + 12 + + + 4 + 7 + 7 + + + 7 + 28 + 7 + + + 44 + 251 + 3 + + + + + + + idx + parentid + + + 12 + + + 1 + 2 + 55 + + + 2 + 3 + 3 + + + 3 + 4 + 11 + + + 4 + 7 + 7 + + + 8 + 28 + 7 + + + 41 + 408 + 4 + + + + + + + idx + isCDATA + + + 12 + + + 1 + 2 + 87 + + + + + + + idx + fileid + + + 12 + + + 1 + 2 + 55 + + + 2 + 3 + 3 + + + 3 + 4 + 12 + + + 4 + 5 + 7 + + + 5 + 12 + 7 + + + 13 + 15 + 3 + + + + + + + isCDATA + id + + + 12 + + + 869 + 870 + 1 + + + + + + + isCDATA + text + + + 12 + + + 427 + 428 + 1 + + + + + + + isCDATA + parentid + + + 12 + + + 432 + 433 + 1 + + + + + + + isCDATA + idx + + + 12 + + + 87 + 88 + 1 + + + + + + + isCDATA + fileid + + + 12 + + + 14 + 15 + 1 + + + + + + + fileid + id + + + 12 + + + 5 + 6 + 1 + + + 13 + 14 + 1 + + + 14 + 15 + 2 + + + 17 + 18 + 1 + + + 28 + 29 + 1 + + + 30 + 31 + 1 + + + 34 + 35 + 1 + + + 35 + 36 + 1 + + + 36 + 37 + 1 + + + 80 + 81 + 1 + + + 177 + 178 + 1 + + + 191 + 192 + 1 + + + 195 + 196 + 1 + + + + + + + fileid + text + + + 12 + + + 3 + 4 + 1 + + + 7 + 8 + 2 + + + 9 + 10 + 1 + + + 13 + 14 + 1 + + + 15 + 16 + 1 + + + 18 + 19 + 1 + + + 24 + 25 + 1 + + + 25 + 26 + 1 + + + 26 + 27 + 1 + + + 49 + 50 + 1 + + + 100 + 101 + 1 + + + 105 + 106 + 1 + + + 118 + 119 + 1 + + + + + + + fileid + parentid + + + 12 + + + 3 + 4 + 1 + + + 7 + 8 + 1 + + + 9 + 10 + 2 + + + 10 + 11 + 1 + + + 14 + 15 + 1 + + + 15 + 16 + 2 + + + 18 + 19 + 1 + + + 20 + 21 + 1 + + + 33 + 34 + 1 + + + 88 + 89 + 1 + + + 95 + 96 + 1 + + + 96 + 97 + 1 + + + + + + + fileid + idx + + + 12 + + + 2 + 3 + 1 + + + 4 + 5 + 2 + + + 5 + 6 + 1 + + + 7 + 8 + 3 + + + 9 + 10 + 1 + + + 13 + 14 + 1 + + + 15 + 16 + 2 + + + 32 + 33 + 1 + + + 35 + 36 + 1 + + + 65 + 66 + 1 + + + + + + + fileid + isCDATA + + + 12 + + + 1 + 2 + 14 + + + + + + + + + xmllocations + 1825 + + + xmlElement + 1825 + + + location + 1825 + + + + + xmlElement + location + + + 12 + + + 1 + 2 + 1825 + + + + + + + location + xmlElement + + + 12 + + + 1 + 2 + 1825 + + + + + + + + + compilations + 1 + + + id + 1 + + + cwd + 1 + + + + + id + cwd + + + 12 + + + 1 + 2 + 1 + + + + + + + cwd + id + + + 12 + + + 1 + 2 + 1 + + + + + + + + + compilation_args + 3 + + + id + 1 + + + num + 3 + + + arg + 3 + + + + + id + num + + + 12 + + + 3 + 4 + 1 + + + + + + + id + arg + + + 12 + + + 3 + 4 + 1 + + + + + + + num + id + + + 12 + + + 1 + 2 + 3 + + + + + + + num + arg + + + 12 + + + 1 + 2 + 3 + + + + + + + arg + id + + + 12 + + + 1 + 2 + 3 + + + + + + + arg + num + + + 12 + + + 1 + 2 + 3 + + + + + + + + + compilation_time + 0 + + + id + 0 + + + num + 0 + + + kind + 0 + + + secs + 0 + + + + + id + num + + + 12 + + + + + + id + kind + + + 12 + + + + + + id + secs + + + 12 + + + + + + num + id + + + 12 + + + + + + num + kind + + + 12 + + + + + + num + secs + + + 12 + + + + + + kind + id + + + 12 + + + + + + kind + num + + + 12 + + + + + + kind + secs + + + 12 + + + + + + secs + id + + + 12 + + + + + + secs + num + + + 12 + + + + + + secs + kind + + + 12 + + + + + + + + diagnostic_for + 0 + + + diagnostic + 0 + + + compilation + 0 + + + file_number + 0 + + + file_number_diagnostic_number + 0 + + + + + diagnostic + compilation + + + 12 + + + 1 + 2 + 1 + + + + + + + diagnostic + file_number + + + 12 + + + 1 + 2 + 1 + + + + + + + diagnostic + file_number_diagnostic_number + + + 12 + + + 1 + 2 + 1 + + + + + + + compilation + diagnostic + + + 12 + + + + + + compilation + file_number + + + 12 + + + + + + compilation + file_number_diagnostic_number + + + 12 + + + + + + file_number + diagnostic + + + 12 + + + + + + file_number + compilation + + + 12 + + + + + + file_number + file_number_diagnostic_number + + + 12 + + + + + + file_number_diagnostic_number + diagnostic + + + 12 + + + + + + file_number_diagnostic_number + compilation + + + 12 + + + + + + file_number_diagnostic_number + file_number + + + 12 + + + + + + + + compilation_finished + 1 + + + id + 1 + + + cpu_seconds + 1 + + + elapsed_seconds + 1 + + + + + id + cpu_seconds + + + 12 + + + 1 + 2 + 1 + + + + + + + id + elapsed_seconds + + + 12 + + + 1 + 2 + 1 + + + + + + + cpu_seconds + id + + + 12 + + + 1 + 2 + 1 + + + + + + + cpu_seconds + elapsed_seconds + + + 12 + + + 1 + 2 + 1 + + + + + + + elapsed_seconds + id + + + 12 + + + 1 + 2 + 1 + + + + + + + elapsed_seconds + cpu_seconds + + + 12 + + + 1 + 2 + 1 + + + + + + + + + compilation_compiling_files + 515 + + + id + 1 + + + num + 515 file - 523 + 515 + + + + + id + num + + + 12 + + + 515 + 516 + 1 + + + + + + + id + file + + + 12 + + + 515 + 516 + 1 + + + + + + + num + id + + + 12 + + + 1 + 2 + 515 + + + + + + + num + file + + + 12 + + + 1 + 2 + 515 + + + + + + + file + id + + + 12 + + + 1 + 2 + 515 + + + + + + + file + num + + + 12 + + + 1 + 2 + 515 + + + + + + + + + diagnostics + 0 + + + id + 0 + + + severity + 0 + + + error_tag + 0 + + + error_message + 0 + + + full_error_message + 0 + + + location + 0 + + + + + id + severity + + + 12 + + + 1 + 2 + 1 + + + + + + + id + error_tag + + + 12 + + + 1 + 2 + 1 + + + + + + + id + error_message + + + 12 + + + 1 + 2 + 1 + + + + + + + id + full_error_message + + + 12 + + + 1 + 2 + 1 + + + + + + + id + location + + + 12 + + + 1 + 2 + 1 + + + + + + + severity + id + + + 12 + + + + + + severity + error_tag + + + 12 + + + + + + severity + error_message + + + 12 + + + + + + severity + full_error_message + + + 12 + + + + + + severity + location + + + 12 + + + + + + error_tag + id + + + 12 + + + + + + error_tag + severity + + + 12 + + + + + + error_tag + error_message + + + 12 + + + + + + error_tag + full_error_message + + + 12 + + + + + + error_tag + location + + + 12 + + + + + + error_message + id + + + 12 + + + + + + error_message + severity + + + 12 + + + + + + error_message + error_tag + + + 12 + + + + + + error_message + full_error_message + + + 12 + + + + + + error_message + location + + + 12 + + + + + + full_error_message + id + + + 12 + + + + + + full_error_message + severity + + + 12 + + + + + + full_error_message + error_tag + + + 12 + + + + + + full_error_message + error_message + + + 12 + + + + + + full_error_message + location + + + 12 + + + + + + location + id + + + 12 + + + + + + location + severity + + + 12 + + + + + + location + error_tag + + + 12 + + + + + + location + error_message + + + 12 + + + + + + location + full_error_message + + + 12 + + + + + + + + locations_default + 539178 + + + id + 539178 + + + file + 529 beginLine @@ -1378,7 +6208,7 @@ beginColumn - 202 + 211 endLine @@ -1386,7 +6216,7 @@ endColumn - 261 + 274 @@ -1400,7 +6230,7 @@ 1 2 - 537408 + 539178 @@ -1416,7 +6246,7 @@ 1 2 - 537408 + 539178 @@ -1432,7 +6262,7 @@ 1 2 - 537408 + 539178 @@ -1448,7 +6278,7 @@ 1 2 - 537408 + 539178 @@ -1464,7 +6294,7 @@ 1 2 - 537408 + 539178 @@ -1478,69 +6308,74 @@ 12 - 2 - 30 - 40 - - - 30 - 121 - 40 - - - 121 - 211 + 4 + 39 41 - 211 - 293 + 39 + 120 40 - 297 - 380 - 43 - - - 380 - 484 + 120 + 208 40 - 484 - 597 + 210 + 290 40 - 601 - 811 + 291 + 372 40 - 828 - 1064 + 372 + 453 + 41 + + + 456 + 563 40 - 1074 - 1371 + 565 + 769 40 - 1373 - 1757 + 774 + 1007 40 - 1765 - 3110 + 1012 + 1339 + 42 + + + 1347 + 1700 40 - 3159 + 1701 + 2804 + 40 + + + 2873 + 6918 + 40 + + + 8171 11207 - 39 + 5 @@ -1554,54 +6389,54 @@ 12 - 2 - 12 - 41 + 3 + 15 + 44 - 12 - 26 - 40 - - - 26 - 45 - 41 - - - 45 - 61 - 40 - - - 61 - 75 - 41 - - - 75 - 93 + 15 + 27 42 - 93 - 120 + 27 + 46 + 40 + + + 46 + 63 + 43 + + + 63 + 78 + 40 + + + 78 + 94 41 + + 95 + 120 + 40 + 120 - 153 + 152 + 41 + + + 152 + 188 40 - 153 - 190 - 40 - - - 190 + 189 247 - 40 + 41 249 @@ -1630,34 +6465,34 @@ 12 - 2 - 11 - 41 - - - 11 - 35 - 41 - - - 35 - 46 - 44 - - - 46 - 52 + 3 + 16 40 - 52 - 59 + 16 + 34 + 40 + + + 34 + 44 + 40 + + + 45 + 51 + 44 + + + 51 + 58 41 - 59 + 58 63 - 42 + 47 63 @@ -1677,7 +6512,7 @@ 80 86 - 40 + 43 86 @@ -1706,69 +6541,74 @@ 12 - 2 - 13 - 40 - - - 13 - 32 - 44 - - - 32 - 56 + 3 + 16 41 - 56 - 75 + 16 + 31 40 - 75 - 94 + 31 + 52 + 40 + + + 52 + 73 43 - 94 - 116 + 73 + 92 + 42 + + + 92 + 111 40 - 116 - 146 + 111 + 139 40 - 146 - 191 + 139 + 180 40 - 191 - 234 + 180 + 219 40 - 235 - 312 + 223 + 293 40 - 316 - 398 + 294 + 370 40 - 403 - 699 + 373 + 616 40 - 704 + 617 + 1835 + 40 + + + 2166 10377 - 35 + 3 @@ -1782,12 +6622,12 @@ 12 - 2 - 18 - 40 + 4 + 21 + 42 - 19 + 22 45 41 @@ -1809,7 +6649,7 @@ 71 76 - 46 + 47 76 @@ -1829,12 +6669,12 @@ 91 97 - 40 + 42 97 105 - 40 + 41 105 @@ -1880,12 +6720,12 @@ 80 698 - 775 + 774 - 698 - 1763 - 249 + 699 + 1775 + 250 @@ -1920,12 +6760,12 @@ 24 - 300 + 304 774 - 302 - 524 + 305 + 530 50 @@ -1947,27 +6787,27 @@ 2 5 - 791 + 789 5 11 - 779 + 780 11 30 - 795 + 796 30 72 - 781 + 779 72 - 109 - 272 + 115 + 274 @@ -1983,7 +6823,7 @@ 1 2 - 7631 + 7630 2 @@ -1993,17 +6833,17 @@ 3 6 - 778 + 779 6 21 - 796 + 792 21 315 - 90 + 94 @@ -2034,17 +6874,17 @@ 12 33 - 779 + 778 33 - 80 - 774 + 81 + 781 - 80 - 116 - 306 + 81 + 127 + 300 @@ -2060,12 +6900,12 @@ 1 2 - 23 + 29 2 4 - 16 + 19 4 @@ -2074,52 +6914,52 @@ 10 - 21 + 22 16 22 - 61 + 62 16 - 61 + 62 141 16 144 - 328 + 330 16 330 - 750 + 759 16 - 773 - 1790 + 781 + 1804 16 - 1835 - 3743 + 1846 + 3757 16 - 4029 - 8601 + 4042 + 8613 16 - 8744 - 21997 + 8764 + 22092 16 - 27991 - 55558 + 28067 + 55590 3 @@ -2136,62 +6976,62 @@ 1 2 - 30 + 36 2 - 5 - 17 + 4 + 14 - 5 - 13 + 4 + 10 18 - 13 - 27 + 10 + 22 + 17 + + + 22 + 48 + 17 + + + 49 + 96 + 17 + + + 96 + 180 16 - 29 - 59 + 180 + 292 16 - 59 - 101 + 297 + 382 16 - 117 - 191 + 383 + 430 16 - 204 - 300 + 431 + 463 16 - 313 - 388 - 16 - - - 389 - 431 - 16 - - - 432 - 459 - 16 - - - 459 - 524 - 9 + 463 + 530 + 12 @@ -2207,62 +7047,67 @@ 1 2 - 30 + 36 2 - 5 - 17 + 4 + 13 - 5 - 15 - 17 - - - 15 - 29 + 4 + 9 16 - 29 - 67 + 9 + 20 16 - 67 - 147 + 20 + 53 16 - 150 - 293 + 55 + 103 16 - 307 - 557 + 107 + 209 16 - 591 - 828 + 221 + 412 16 - 842 - 1216 + 422 + 682 16 - 1220 - 1550 + 706 + 975 16 - 1579 - 10182 - 10 + 977 + 1410 + 16 + + + 1417 + 1983 + 16 + + + 2809 + 10184 + 2 @@ -2278,62 +7123,62 @@ 1 2 - 30 + 36 2 - 5 - 17 + 4 + 13 - 5 - 15 + 4 + 9 16 - 15 - 29 - 17 + 9 + 21 + 19 - 29 - 67 + 24 + 55 16 - 68 - 148 + 58 + 128 16 - 148 - 291 + 131 + 226 16 - 307 - 555 + 231 + 453 16 - 594 - 832 + 480 + 769 16 - 842 - 1226 + 783 + 1037 16 - 1237 - 1568 + 1057 + 1521 16 - 1596 - 10178 - 10 + 1526 + 10180 + 15 @@ -2349,12 +7194,12 @@ 1 2 - 25 + 31 2 3 - 13 + 16 3 @@ -2364,7 +7209,7 @@ 6 12 - 18 + 17 12 @@ -2374,42 +7219,37 @@ 21 28 - 15 + 16 28 - 34 + 35 17 - 34 - 44 - 14 - - - 44 - 54 + 35 + 45 16 - 54 - 72 + 46 + 56 16 - 73 - 99 - 16 + 56 + 77 + 17 - 99 - 128 - 16 + 77 + 101 + 17 - 135 + 101 201 - 3 + 15 @@ -2449,7 +7289,7 @@ 458 - 1723 + 1734 363 @@ -2490,7 +7330,7 @@ 105 - 524 + 530 352 @@ -2512,12 +7352,12 @@ 2 3 - 958 + 956 3 7 - 859 + 860 7 @@ -2527,7 +7367,7 @@ 27 31 - 10 + 11 @@ -2548,27 +7388,27 @@ 2 4 - 617 + 616 4 8 - 879 + 878 8 21 - 800 + 799 21 - 54 - 798 + 53 + 779 - 54 - 106 - 535 + 53 + 113 + 557 @@ -2603,13 +7443,13 @@ 34 - 82 - 783 + 83 + 787 - 82 - 116 - 275 + 83 + 127 + 271 @@ -2625,7 +7465,7 @@ 1 2 - 20 + 33 2 @@ -2634,48 +7474,48 @@ 3 - 8 + 9 + 23 + + + 9 + 40 21 - 8 - 33 + 43 + 111 21 - 37 - 92 - 20 + 121 + 347 + 21 - 94 - 260 - 20 + 369 + 1229 + 21 - 287 - 915 - 20 + 1267 + 3311 + 21 - 1002 - 2526 - 20 + 3642 + 7560 + 21 - 2555 - 5288 - 20 + 7682 + 12716 + 21 - 5734 - 10001 - 20 - - - 10080 - 20361 - 19 + 12740 + 20483 + 11 @@ -2691,7 +7531,7 @@ 1 2 - 81 + 94 2 @@ -2700,43 +7540,43 @@ 6 - 15 - 20 - - - 15 - 40 - 20 - - - 40 - 100 - 20 - - - 103 - 221 - 20 - - - 243 - 370 - 20 - - - 371 - 430 - 20 - - - 430 - 453 + 16 21 - 453 - 524 - 20 + 16 + 45 + 21 + + + 45 + 110 + 21 + + + 123 + 281 + 21 + + + 290 + 393 + 21 + + + 395 + 445 + 21 + + + 446 + 468 + 21 + + + 470 + 530 + 14 @@ -2752,12 +7592,12 @@ 1 2 - 81 + 94 2 6 - 20 + 19 6 @@ -2766,38 +7606,38 @@ 21 - 51 - 20 + 52 + 21 - 55 - 144 - 20 + 54 + 154 + 21 - 152 - 414 - 20 + 157 + 449 + 21 - 433 - 747 - 20 + 455 + 808 + 21 - 758 - 1032 - 20 + 814 + 1132 + 21 - 1050 - 1628 - 20 + 1145 + 1769 + 21 - 1653 + 1792 2365 - 19 + 14 @@ -2813,7 +7653,7 @@ 1 2 - 26 + 39 2 @@ -2827,43 +7667,43 @@ 7 - 17 + 18 21 - 17 - 26 + 18 + 27 24 27 - 36 - 20 - - - 36 - 47 - 21 - - - 47 - 58 - 20 - - - 58 - 71 - 21 - - - 71 - 79 + 37 22 - 79 + 37 + 49 + 23 + + + 49 + 63 + 22 + + + 63 + 74 + 20 + + + 74 + 102 + 21 + + + 103 172 - 7 + 3 @@ -2879,12 +7719,12 @@ 1 2 - 81 + 94 2 6 - 20 + 19 6 @@ -2893,38 +7733,38 @@ 21 - 51 - 20 + 52 + 21 - 54 - 142 - 20 + 53 + 153 + 21 - 151 - 407 - 20 + 156 + 444 + 21 - 423 - 732 - 20 + 446 + 789 + 21 - 744 - 1017 - 20 + 806 + 1121 + 21 - 1040 - 1627 - 20 + 1138 + 1726 + 21 - 1629 + 1787 2357 - 19 + 14 @@ -3325,23 +8165,23 @@ files - 523 + 529 id - 523 + 529 name - 523 + 529 simple - 364 + 373 ext - 2 + 3 fromSource @@ -3359,7 +8199,7 @@ 1 2 - 523 + 529 @@ -3375,7 +8215,7 @@ 1 2 - 523 + 529 @@ -3391,7 +8231,7 @@ 1 2 - 523 + 529 @@ -3407,7 +8247,7 @@ 1 2 - 523 + 529 @@ -3423,7 +8263,7 @@ 1 2 - 523 + 529 @@ -3439,7 +8279,7 @@ 1 2 - 523 + 529 @@ -3455,7 +8295,7 @@ 1 2 - 523 + 529 @@ -3471,7 +8311,7 @@ 1 2 - 523 + 529 @@ -3487,12 +8327,12 @@ 1 2 - 294 + 301 2 3 - 45 + 47 3 @@ -3513,12 +8353,12 @@ 1 2 - 294 + 301 2 3 - 45 + 47 3 @@ -3539,7 +8379,12 @@ 1 2 - 364 + 368 + + + 2 + 3 + 5 @@ -3555,7 +8400,7 @@ 1 2 - 364 + 373 @@ -3569,8 +8414,13 @@ 12 - 9 - 10 + 1 + 2 + 1 + + + 14 + 15 1 @@ -3590,8 +8440,13 @@ 12 - 9 - 10 + 1 + 2 + 1 + + + 14 + 15 1 @@ -3615,6 +8470,11 @@ 2 1 + + 14 + 15 + 1 + 363 364 @@ -3634,7 +8494,7 @@ 1 2 - 2 + 3 @@ -3648,8 +8508,8 @@ 12 - 523 - 524 + 529 + 530 1 @@ -3664,8 +8524,8 @@ 12 - 523 - 524 + 529 + 530 1 @@ -3680,8 +8540,8 @@ 12 - 364 - 365 + 373 + 374 1 @@ -3696,8 +8556,8 @@ 12 - 2 - 3 + 3 + 4 1 @@ -3708,19 +8568,19 @@ folders - 223 + 210 id - 223 + 210 name - 223 + 210 simple - 186 + 178 @@ -3734,7 +8594,7 @@ 1 2 - 223 + 210 @@ -3750,7 +8610,7 @@ 1 2 - 223 + 210 @@ -3766,7 +8626,7 @@ 1 2 - 223 + 210 @@ -3782,7 +8642,7 @@ 1 2 - 223 + 210 @@ -3798,17 +8658,17 @@ 1 2 - 163 + 157 2 3 - 19 + 18 3 10 - 4 + 3 @@ -3824,17 +8684,17 @@ 1 2 - 163 + 157 2 3 - 19 + 18 3 10 - 4 + 3 @@ -3844,15 +8704,15 @@ containerparent - 745 + 738 parent - 223 + 210 child - 745 + 738 @@ -3866,37 +8726,32 @@ 1 2 - 127 + 115 2 3 - 31 + 32 3 4 - 13 + 12 4 - 5 - 13 + 6 + 19 - 5 - 8 - 18 + 6 + 12 + 16 - 8 - 25 - 17 - - - 25 - 39 - 4 + 13 + 38 + 16 @@ -3912,7 +8767,7 @@ 1 2 - 745 + 738 @@ -3922,15 +8777,15 @@ has_location - 599403 + 599339 locatable - 599403 + 599339 location - 537408 + 537353 @@ -3944,7 +8799,7 @@ 1 2 - 599403 + 599339 @@ -3960,12 +8815,12 @@ 1 2 - 475728 + 475682 2 3 - 61636 + 61627 3 @@ -3980,15 +8835,15 @@ comment_groups - 12094 + 12083 id - 12094 + 12083 parent - 514 + 509 idx @@ -4006,7 +8861,7 @@ 1 2 - 12094 + 12083 @@ -4022,7 +8877,7 @@ 1 2 - 12094 + 12083 @@ -4038,7 +8893,7 @@ 1 2 - 47 + 44 2 @@ -4048,7 +8903,7 @@ 3 4 - 33 + 32 4 @@ -4058,7 +8913,7 @@ 5 7 - 39 + 38 7 @@ -4114,7 +8969,7 @@ 1 2 - 47 + 44 2 @@ -4124,7 +8979,7 @@ 3 4 - 33 + 32 4 @@ -4134,7 +8989,7 @@ 5 7 - 39 + 38 7 @@ -4219,7 +9074,7 @@ 323 - 515 + 510 7 @@ -4265,7 +9120,7 @@ 323 - 515 + 510 7 @@ -4276,11 +9131,11 @@ comments - 25737 + 25724 id - 25737 + 25724 kind @@ -4288,7 +9143,7 @@ parent - 12094 + 12083 idx @@ -4296,7 +9151,7 @@ text - 20694 + 20683 @@ -4310,7 +9165,7 @@ 1 2 - 25737 + 25724 @@ -4326,7 +9181,7 @@ 1 2 - 25737 + 25724 @@ -4342,7 +9197,7 @@ 1 2 - 25737 + 25724 @@ -4358,7 +9213,7 @@ 1 2 - 25737 + 25724 @@ -4377,8 +9232,8 @@ 1 - 24891 - 24892 + 24878 + 24879 1 @@ -4398,8 +9253,8 @@ 1 - 11250 - 11251 + 11239 + 11240 1 @@ -4440,8 +9295,8 @@ 1 - 20004 - 20005 + 19993 + 19994 1 @@ -4458,12 +9313,12 @@ 1 2 - 7837 + 7828 2 3 - 1789 + 1787 3 @@ -4494,7 +9349,7 @@ 1 2 - 12092 + 12081 2 @@ -4515,12 +9370,12 @@ 1 2 - 7837 + 7828 2 3 - 1789 + 1787 3 @@ -4551,12 +9406,12 @@ 1 2 - 7837 + 7828 2 3 - 1819 + 1817 3 @@ -4636,7 +9491,7 @@ 242 - 12095 + 12084 11 @@ -4723,7 +9578,7 @@ 242 - 12095 + 12084 11 @@ -4784,7 +9639,7 @@ 165 - 10511 + 10500 12 @@ -4801,12 +9656,12 @@ 1 2 - 19560 + 19550 2 1935 - 1134 + 1133 @@ -4822,7 +9677,7 @@ 1 2 - 20694 + 20683 @@ -4838,12 +9693,12 @@ 1 2 - 19585 + 19575 2 828 - 1109 + 1108 @@ -4859,12 +9714,12 @@ 1 2 - 20533 + 20523 2 107 - 161 + 160 @@ -4874,15 +9729,15 @@ doc_comments - 4341 + 4330 node - 4341 + 4330 comment - 4341 + 4330 @@ -4896,7 +9751,7 @@ 1 2 - 4341 + 4330 @@ -4912,7 +9767,7 @@ 1 2 - 4341 + 4330 @@ -7299,11 +12154,11 @@ scopes - 36770 + 36775 id - 36770 + 36775 kind @@ -7321,7 +12176,7 @@ 1 2 - 36770 + 36775 @@ -7340,8 +12195,8 @@ 1 - 341 - 342 + 346 + 347 1 @@ -7357,11 +12212,11 @@ scopenesting - 36769 + 36774 inner - 36769 + 36774 outer @@ -7379,7 +12234,7 @@ 1 2 - 36769 + 36774 @@ -7409,7 +12264,7 @@ 7 - 342 + 347 516 @@ -7468,11 +12323,11 @@ objects - 83171 + 84909 id - 83171 + 84909 kind @@ -7480,7 +12335,7 @@ name - 29534 + 30576 @@ -7494,7 +12349,7 @@ 1 2 - 83171 + 84909 @@ -7510,7 +12365,7 @@ 1 2 - 83171 + 84909 @@ -7549,23 +12404,23 @@ 1 - 3499 - 3500 + 3602 + 3603 1 - 8489 - 8490 + 8857 + 8858 1 - 17257 - 17258 + 17793 + 17794 1 - 50367 - 50368 + 51098 + 51099 1 @@ -7605,23 +12460,23 @@ 1 - 2924 - 2925 + 3004 + 3005 1 - 8048 - 8049 + 8418 + 8419 1 - 9833 - 9834 + 10132 + 10133 1 - 10579 - 10580 + 10913 + 10914 1 @@ -7638,22 +12493,22 @@ 1 2 - 24323 + 25286 2 3 - 2561 + 2613 3 - 17 - 2229 + 20 + 2304 - 17 - 2197 - 421 + 20 + 2222 + 373 @@ -7669,12 +12524,12 @@ 1 2 - 27802 + 28809 2 6 - 1732 + 1767 @@ -7684,15 +12539,15 @@ objectscopes - 53877 + 54774 object - 53877 + 54774 scope - 13942 + 13947 @@ -7706,7 +12561,7 @@ 1 2 - 53877 + 54774 @@ -7727,27 +12582,27 @@ 2 3 - 2970 + 2972 3 4 - 1276 + 1274 4 6 - 1262 + 1264 6 15 - 1056 + 1055 15 - 2520 - 266 + 2694 + 270 @@ -7757,15 +12612,15 @@ objecttypes - 83169 + 84907 object - 83169 + 84907 tp - 13062 + 13462 @@ -7779,7 +12634,7 @@ 1 2 - 83169 + 84907 @@ -7795,32 +12650,32 @@ 1 2 - 7630 + 7893 2 3 - 2070 + 2114 3 4 - 862 + 892 4 7 - 1150 + 1190 7 25 - 993 + 1011 25 - 4231 - 357 + 4267 + 362 @@ -7830,15 +12685,15 @@ methodreceivers - 9624 + 9873 method - 9624 + 9873 receiver - 9624 + 9873 @@ -7852,7 +12707,7 @@ 1 2 - 9624 + 9873 @@ -7868,7 +12723,7 @@ 1 2 - 9624 + 9873 @@ -7878,15 +12733,15 @@ fieldstructs - 10591 + 10934 field - 10591 + 10934 struct - 2338 + 2408 @@ -7900,7 +12755,7 @@ 1 2 - 10591 + 10934 @@ -7916,42 +12771,42 @@ 1 2 - 249 + 260 2 3 - 664 + 677 3 4 - 446 + 468 4 5 - 286 + 292 5 6 - 192 + 194 6 8 - 203 + 208 8 13 - 190 + 199 13 - 62 - 108 + 65 + 110 @@ -7961,15 +12816,15 @@ methodhosts - 792 + 838 method - 672 + 699 host - 241 + 258 @@ -7983,17 +12838,17 @@ 1 2 - 610 + 625 2 - 5 + 3 56 - 5 - 15 - 6 + 3 + 16 + 18 @@ -8009,22 +12864,22 @@ 1 2 - 95 + 99 2 3 - 50 + 56 3 4 - 33 + 37 4 5 - 18 + 20 5 @@ -8034,7 +12889,7 @@ 6 11 - 20 + 21 11 @@ -8180,11 +13035,11 @@ types - 17637 + 18132 id - 17637 + 18132 kind @@ -8202,7 +13057,7 @@ 1 2 - 17637 + 18132 @@ -8222,22 +13077,22 @@ 10 - 31 + 30 3 - 232 - 417 + 247 + 431 3 559 - 1862 + 1904 3 - 2339 - 7773 + 2409 + 8011 3 @@ -8256,7 +13111,7 @@ tp - 8673 + 8687 @@ -8286,57 +13141,57 @@ 1 2 - 2010 + 2019 2 3 - 962 + 967 3 4 - 714 + 711 4 5 - 383 + 388 5 7 - 783 + 780 7 10 - 770 + 772 10 15 - 737 + 734 15 23 - 699 + 700 23 - 44 - 661 + 43 + 652 - 44 - 149 - 651 + 43 + 143 + 652 - 150 + 143 46949 - 303 + 312 @@ -8346,15 +13201,15 @@ typename - 3471 + 3567 tp - 3471 + 3567 name - 2903 + 2983 @@ -8368,7 +13223,7 @@ 1 2 - 3471 + 3567 @@ -8384,17 +13239,17 @@ 1 2 - 2584 + 2660 2 4 - 265 + 267 4 - 16 - 54 + 17 + 56 @@ -8404,15 +13259,15 @@ key_type - 416 + 430 map - 416 + 430 tp - 143 + 149 @@ -8426,7 +13281,7 @@ 1 2 - 416 + 430 @@ -8442,27 +13297,27 @@ 1 2 - 101 + 106 2 3 - 18 + 17 3 6 - 10 + 12 6 - 10 - 11 + 13 + 12 - 12 - 134 - 3 + 20 + 136 + 2 @@ -8472,15 +13327,15 @@ element_type - 1378 + 1412 container - 1378 + 1412 tp - 892 + 916 @@ -8494,7 +13349,7 @@ 1 2 - 1378 + 1412 @@ -8510,17 +13365,17 @@ 1 2 - 756 + 773 2 3 - 90 + 94 3 - 65 - 46 + 68 + 49 @@ -8530,15 +13385,15 @@ base_type - 1861 + 1903 ptr - 1861 + 1903 tp - 1861 + 1903 @@ -8552,7 +13407,7 @@ 1 2 - 1861 + 1903 @@ -8568,7 +13423,7 @@ 1 2 - 1861 + 1903 @@ -8578,15 +13433,15 @@ underlying_type - 3471 + 3567 named - 3471 + 3567 tp - 2677 + 2755 @@ -8600,7 +13455,7 @@ 1 2 - 3471 + 3567 @@ -8616,12 +13471,12 @@ 1 2 - 2505 + 2582 2 - 148 - 172 + 154 + 173 @@ -8631,23 +13486,23 @@ component_types - 35194 + 36474 parent - 10898 + 11221 index - 71 + 74 name - 5339 + 5540 tp - 4170 + 4295 @@ -8661,37 +13516,37 @@ 1 2 - 1157 + 1198 2 3 - 3880 + 3864 3 4 - 2791 + 2953 4 5 - 1377 + 1446 5 6 - 759 + 780 6 - 14 - 828 + 13 + 860 - 14 - 62 - 106 + 13 + 65 + 120 @@ -8707,22 +13562,22 @@ 1 2 - 8684 + 8936 2 3 - 712 + 733 3 6 - 975 + 1008 6 - 61 - 527 + 64 + 544 @@ -8738,32 +13593,32 @@ 1 2 - 2232 + 2194 2 3 - 4348 + 4537 3 4 - 2379 + 2475 4 5 - 1068 + 1110 5 - 13 - 822 + 12 + 848 - 13 + 12 52 - 49 + 57 @@ -8779,62 +13634,62 @@ 1 2 - 13 + 15 2 - 3 + 4 + 6 + + + 4 + 7 4 - 3 - 6 - 5 - - - 6 - 11 + 8 + 13 6 - 11 - 17 - 5 - - - 17 - 23 + 13 + 18 6 - 24 - 42 + 18 + 28 6 - 47 - 70 + 29 + 49 6 - 81 - 152 + 52 + 82 6 - 186 - 490 + 89 + 193 6 - 794 - 5839 + 232 + 824 6 - 6255 - 9984 - 2 + 1505 + 6458 + 6 + + + 10274 + 10275 + 1 @@ -8850,51 +13705,51 @@ 1 2 - 19 + 22 2 - 4 + 6 6 - 4 + 6 9 6 9 - 15 - 5 + 16 + 4 16 - 22 - 5 - - - 22 - 33 + 24 6 - 36 - 59 + 24 + 37 6 - 66 - 112 + 39 + 61 6 - 143 - 355 + 69 + 116 6 - 455 - 1228 + 153 + 379 + 6 + + + 475 + 1260 6 @@ -8911,62 +13766,62 @@ 1 2 - 13 + 15 2 - 3 - 4 + 4 + 6 - 3 - 6 + 4 + 7 + 6 + + + 7 + 11 5 - 6 - 8 - 6 - - - 9 + 11 14 + 5 + + + 15 + 19 6 - 14 - 18 + 20 + 27 + 5 + + + 29 + 44 6 - 18 - 28 + 45 + 72 6 - 32 - 46 + 86 + 161 6 - 47 - 84 + 224 + 1436 6 - 103 - 216 - 6 - - - 297 - 1836 - 6 - - - 2095 - 2096 - 1 + 1878 + 2153 + 2 @@ -8982,22 +13837,22 @@ 1 2 - 3760 + 3941 2 3 - 847 + 851 3 - 5 - 406 + 6 + 484 - 5 - 8671 - 326 + 6 + 8917 + 264 @@ -9013,17 +13868,17 @@ 1 2 - 4133 + 4284 2 3 - 704 + 737 3 6 - 423 + 440 6 @@ -9044,22 +13899,22 @@ 1 2 - 4427 + 4599 2 3 - 498 + 518 3 - 16 - 401 + 21 + 416 - 16 - 2936 - 13 + 21 + 3014 + 7 @@ -9075,32 +13930,32 @@ 1 2 - 1992 + 2055 2 3 - 795 + 812 3 4 - 400 + 408 4 6 - 374 + 394 6 11 - 330 + 342 11 - 2115 - 279 + 2187 + 284 @@ -9116,32 +13971,32 @@ 1 2 - 2042 + 2111 2 3 - 836 + 859 3 4 - 561 + 580 4 5 - 347 + 352 5 10 - 324 + 328 10 - 49 - 60 + 51 + 65 @@ -9157,22 +14012,22 @@ 1 2 - 2808 + 2897 2 3 - 841 + 865 3 5 - 333 + 343 5 - 679 - 188 + 738 + 190 @@ -9182,11 +14037,11 @@ array_length - 292 + 293 tp - 292 + 293 len @@ -9204,7 +14059,7 @@ 1 2 - 292 + 293 @@ -9225,27 +14080,27 @@ 2 3 - 16 + 15 3 - 5 + 4 + 7 + + + 4 + 7 8 - 5 - 8 - 8 + 7 + 15 + 7 - 10 - 16 - 8 - - - 26 - 27 - 1 + 15 + 26 + 4 @@ -9255,15 +14110,15 @@ type_objects - 3471 + 3567 tp - 3471 + 3567 object - 3471 + 3567 @@ -9277,7 +14132,7 @@ 1 2 - 3471 + 3567 @@ -9293,7 +14148,7 @@ 1 2 - 3471 + 3567 @@ -9303,23 +14158,23 @@ packages - 341 + 346 id - 341 + 346 name - 276 + 281 path - 341 + 346 scope - 341 + 346 @@ -9333,7 +14188,7 @@ 1 2 - 341 + 346 @@ -9349,7 +14204,7 @@ 1 2 - 341 + 346 @@ -9365,7 +14220,7 @@ 1 2 - 341 + 346 @@ -9381,7 +14236,7 @@ 1 2 - 250 + 255 2 @@ -9407,7 +14262,7 @@ 1 2 - 250 + 255 2 @@ -9433,7 +14288,7 @@ 1 2 - 250 + 255 2 @@ -9459,7 +14314,7 @@ 1 2 - 341 + 346 @@ -9475,7 +14330,7 @@ 1 2 - 341 + 346 @@ -9491,7 +14346,7 @@ 1 2 - 341 + 346 @@ -9507,7 +14362,7 @@ 1 2 - 341 + 346 @@ -9523,7 +14378,7 @@ 1 2 - 341 + 346 @@ -9539,7 +14394,7 @@ 1 2 - 341 + 346 @@ -9549,23 +14404,23 @@ modexprs - 41 + 9 id - 41 + 9 kind - 5 + 4 parent - 11 + 2 idx - 7 + 6 @@ -9579,7 +14434,7 @@ 1 2 - 41 + 9 @@ -9595,7 +14450,7 @@ 1 2 - 41 + 9 @@ -9611,7 +14466,7 @@ 1 2 - 41 + 9 @@ -9625,18 +14480,13 @@ 12 - 2 - 3 + 1 + 2 3 - 3 - 4 - 1 - - - 32 - 33 + 6 + 7 1 @@ -9653,16 +14503,11 @@ 1 2 - 1 + 3 2 3 - 3 - - - 11 - 12 1 @@ -9679,176 +14524,101 @@ 1 2 - 2 - - - 2 - 3 - 1 - - - 3 - 4 - 1 - - - 6 - 7 - 1 - - - - - - - parent - id - - - 12 - - - 1 - 2 - 1 - - - 2 - 3 - 2 - - - 3 - 4 3 - - 4 - 5 - 2 - - - 6 - 7 - 2 - - - 7 - 8 - 1 - - - - - - - parent - kind - - - 12 - - - 1 - 2 - 6 - - - 2 - 3 - 3 - - - 3 - 4 - 2 - - - - - - - parent - idx - - - 12 - - - 1 - 2 - 1 - - - 2 - 3 - 2 - - - 3 - 4 - 3 - - - 4 - 5 - 2 - - - 6 - 7 - 2 - - - 7 - 8 - 1 - - - - - - - idx - id - - - 12 - - - 1 - 2 - 1 - - - 3 - 4 - 2 - 5 6 1 + + + + + + parent + id + + + 12 + - 8 - 9 + 3 + 4 1 - 10 - 11 + 6 + 7 + 1 + + + + + + + parent + kind + + + 12 + + + 2 + 3 1 - 11 - 12 + 3 + 4 1 + + parent + idx + + + 12 + + + 3 + 4 + 1 + + + 6 + 7 + 1 + + + + + + + idx + id + + + 12 + + + 1 + 2 + 3 + + + 2 + 3 + 3 + + + + + idx kind @@ -9859,17 +14629,12 @@ 1 2 - 2 - - - 2 - 3 4 - 3 - 4 - 1 + 2 + 3 + 2 @@ -9885,32 +14650,12 @@ 1 2 - 1 + 3 - 3 - 4 - 2 - - - 5 - 6 - 1 - - - 8 - 9 - 1 - - - 10 - 11 - 1 - - - 11 - 12 - 1 + 2 + 3 + 3 @@ -9920,19 +14665,19 @@ modtokens - 73 + 13 token - 38 + 13 parent - 34 + 7 idx - 4 + 2 @@ -9946,22 +14691,7 @@ 1 2 - 30 - - - 2 - 5 - 3 - - - 5 - 8 - 3 - - - 8 - 10 - 2 + 13 @@ -9977,12 +14707,7 @@ 1 2 - 36 - - - 2 - 3 - 2 + 13 @@ -9998,22 +14723,12 @@ 1 2 - 2 + 1 2 3 - 26 - - - 3 - 4 - 5 - - - 4 - 5 - 1 + 6 @@ -10029,22 +14744,12 @@ 1 2 - 2 + 1 2 3 - 26 - - - 3 - 4 - 5 - - - 4 - 5 - 1 + 6 @@ -10058,23 +14763,13 @@ 12 - 1 - 2 + 6 + 7 1 - 3 - 4 - 1 - - - 13 - 14 - 1 - - - 23 - 24 + 7 + 8 1 @@ -10088,24 +14783,14 @@ 12 - - 1 - 2 - 1 - 6 7 1 - 32 - 33 - 1 - - - 34 - 35 + 7 + 8 1 diff --git a/ql/test/extractor-tests/diagnostics/CONSISTENCY/UnexpectedFrontendErrors.expected b/ql/test/extractor-tests/diagnostics/CONSISTENCY/UnexpectedFrontendErrors.expected new file mode 100644 index 00000000000..b78781de117 --- /dev/null +++ b/ql/test/extractor-tests/diagnostics/CONSISTENCY/UnexpectedFrontendErrors.expected @@ -0,0 +1,5 @@ +| broken2/test1.go:4:2:4:2 | undeclared name: fmt | +| broken2/test1.go:5:2:5:2 | undeclared name: fmt | +| broken2/test1.go:5:14:5:14 | undeclared name: a | +| broken2/test.go:3:1:3:1 | expected 'package', found pac | +| broken/test.go:7:1:7:1 | expected declaration, found This | diff --git a/ql/test/extractor-tests/diagnostics/Diagnostics.expected b/ql/test/extractor-tests/diagnostics/Diagnostics.expected new file mode 100644 index 00000000000..af155e81213 --- /dev/null +++ b/ql/test/extractor-tests/diagnostics/Diagnostics.expected @@ -0,0 +1,12 @@ +qcompilations +| compilation in 'diagnostics': go-extractor -mod=vendor -- ./... | broken2/test1.go:0:0:0:0 | broken2/test1.go | +| compilation in 'diagnostics': go-extractor -mod=vendor -- ./... | broken2/test2.go:0:0:0:0 | broken2/test2.go | +| compilation in 'diagnostics': go-extractor -mod=vendor -- ./... | broken/test.go:0:0:0:0 | broken/test.go | +| compilation in 'diagnostics': go-extractor -mod=vendor -- ./... | go.mod:0:0:0:0 | go.mod | +| compilation in 'diagnostics': go-extractor -mod=vendor -- ./... | notbroken/test.go:0:0:0:0 | notbroken/test.go | +qdiagnostics +| broken2/test1.go:4:2:4:2 | error: undeclared name: fmt | compilation in 'diagnostics': go-extractor -mod=vendor -- ./... | broken2/test1.go:0:0:0:0 | broken2/test1.go | +| broken2/test1.go:5:2:5:2 | error: undeclared name: fmt | compilation in 'diagnostics': go-extractor -mod=vendor -- ./... | broken2/test1.go:0:0:0:0 | broken2/test1.go | +| broken2/test1.go:5:14:5:14 | error: undeclared name: a | compilation in 'diagnostics': go-extractor -mod=vendor -- ./... | broken2/test1.go:0:0:0:0 | broken2/test1.go | +| broken/test.go:7:1:7:1 | error: expected declaration, found This | compilation in 'diagnostics': go-extractor -mod=vendor -- ./... | broken/test.go:0:0:0:0 | broken/test.go | +duplicateerrs diff --git a/ql/test/extractor-tests/diagnostics/Diagnostics.ql b/ql/test/extractor-tests/diagnostics/Diagnostics.ql new file mode 100644 index 00000000000..a6e3810c39a --- /dev/null +++ b/ql/test/extractor-tests/diagnostics/Diagnostics.ql @@ -0,0 +1,56 @@ +import go + +bindingset[path] +string baseName(string path) { result = path.regexpCapture(".*(/|\\\\)([^/\\\\]+)(/|\\\\)?$", 2) } + +class Compilation extends @compilation { + string getArg(int i) { compilation_args(this, i, result) } + + string getCwd() { compilations(this, result) } + + int getNumArgs() { result = count(int i | exists(this.getArg(i))) } + + predicate compilesFile(int i, File f) { compilation_compiling_files(this, i, f) } + + private string getArgsTo(int i) { + // use baseName for location-independent tests + i = 0 and result = baseName(this.getArg(0)) + or + result = this.getArgsTo(i - 1) + " " + this.getArg(i) + } + + string toString() { + result = + "compilation in '" + baseName(this.getCwd()) + "': " + this.getArgsTo(this.getNumArgs() - 1) + } +} + +class Diagnostic extends @diagnostic { + predicate diagnosticFor(Compilation c, int fileNum, int idx) { + diagnostic_for(this, c, fileNum, idx) + } + + Location getLocation() { diagnostics(this, _, _, _, _, result) } + + // string getTag() { + // diagnostics(this, _, result, _, _, _) + // } + string getMessage() { diagnostics(this, _, _, result, _, _) } + + // string getFullMessage() { + // diagnostics(this, _, _, _, result, _) + // } + string toString() { result = "error: " + this.getMessage() } +} + +query predicate qcompilations(Compilation c, File f) { c.compilesFile(_, f) } + +query predicate qdiagnostics(Diagnostic d, Compilation c, File f) { + exists(int fileno | d.diagnosticFor(c, fileno, _) | c.compilesFile(fileno, f)) +} + +query predicate duplicateerrs(Diagnostic d, Diagnostic d1, Compilation c, int fileno, int idx) { + d != d1 and + d.diagnosticFor(c, fileno, idx) and + d1.diagnosticFor(c, fileno, idx) +} diff --git a/ql/test/extractor-tests/diagnostics/broken/test.go b/ql/test/extractor-tests/diagnostics/broken/test.go new file mode 100644 index 00000000000..e641c4240a9 --- /dev/null +++ b/ql/test/extractor-tests/diagnostics/broken/test.go @@ -0,0 +1,7 @@ +package main + +// autoformat-ignore (gofmt chokes on invalid programs) + +// Example file with a syntax error to demonstrate use of consistency queries + +This is not a valid Go program diff --git a/ql/test/extractor-tests/diagnostics/broken2/test.go b/ql/test/extractor-tests/diagnostics/broken2/test.go new file mode 100644 index 00000000000..5b470ea13c6 --- /dev/null +++ b/ql/test/extractor-tests/diagnostics/broken2/test.go @@ -0,0 +1,3 @@ +// autoformat-ignore + +pac diff --git a/ql/test/extractor-tests/diagnostics/broken2/test1.go b/ql/test/extractor-tests/diagnostics/broken2/test1.go new file mode 100644 index 00000000000..f11e0fd119b --- /dev/null +++ b/ql/test/extractor-tests/diagnostics/broken2/test1.go @@ -0,0 +1,6 @@ +package main + +func main() { + fmt.Println("a") + fmt.Println(a) +} diff --git a/ql/test/extractor-tests/diagnostics/broken2/test2.go b/ql/test/extractor-tests/diagnostics/broken2/test2.go new file mode 100644 index 00000000000..06ab7d0f9a3 --- /dev/null +++ b/ql/test/extractor-tests/diagnostics/broken2/test2.go @@ -0,0 +1 @@ +package main diff --git a/ql/test/extractor-tests/diagnostics/go.mod b/ql/test/extractor-tests/diagnostics/go.mod new file mode 100644 index 00000000000..202a01a8a33 --- /dev/null +++ b/ql/test/extractor-tests/diagnostics/go.mod @@ -0,0 +1,3 @@ +module codeql-go-tests/diagnostics + +go 1.16 diff --git a/ql/test/extractor-tests/diagnostics/notbroken/test.go b/ql/test/extractor-tests/diagnostics/notbroken/test.go new file mode 100644 index 00000000000..06ab7d0f9a3 --- /dev/null +++ b/ql/test/extractor-tests/diagnostics/notbroken/test.go @@ -0,0 +1 @@ +package main diff --git a/upgrades/4affa49dbe2bbab1a33f0e3ea6b045116abbcfda/go.dbscheme b/upgrades/4affa49dbe2bbab1a33f0e3ea6b045116abbcfda/go.dbscheme index 2e92b436892..b37faf5d62c 100644 --- a/upgrades/4affa49dbe2bbab1a33f0e3ea6b045116abbcfda/go.dbscheme +++ b/upgrades/4affa49dbe2bbab1a33f0e3ea6b045116abbcfda/go.dbscheme @@ -110,6 +110,24 @@ xmllocations( @xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; +compilations(unique int id: @compilation, string cwd: string ref); + +#keyset[id, num] +compilation_args(int id: @compilation ref, int num: int ref, string arg: string ref); + +#keyset[id, num, kind] +compilation_time(int id: @compilation ref, int num: int ref, int kind: int ref, float secs: float ref); + +diagnostic_for(unique int diagnostic: @diagnostic ref, int compilation: @compilation ref, int file_number: int ref, int file_number_diagnostic_number: int ref); + +compilation_finished(unique int id: @compilation ref, float cpu_seconds: float ref, float elapsed_seconds: float ref); + +#keyset[id, num] +compilation_compiling_files(int id: @compilation ref, int num: int ref, int file: @file ref); + +diagnostics(unique int id: @diagnostic, int severity: int ref, string error_tag: string ref, string error_message: string ref, + string full_error_message: string ref, int location: @location ref); + locations_default(unique int id: @location_default, int file: @file ref, int beginLine: int ref, int beginColumn: int ref, int endLine: int ref, int endColumn: int ref); diff --git a/upgrades/4affa49dbe2bbab1a33f0e3ea6b045116abbcfda/upgrade.properties b/upgrades/4affa49dbe2bbab1a33f0e3ea6b045116abbcfda/upgrade.properties index ab29172e52f..a8f8117437c 100644 --- a/upgrades/4affa49dbe2bbab1a33f0e3ea6b045116abbcfda/upgrade.properties +++ b/upgrades/4affa49dbe2bbab1a33f0e3ea6b045116abbcfda/upgrade.properties @@ -1,2 +1,2 @@ -description: Add XML tables +description: Add tables for extractor diagnostics and XML compatibility: backwards