Chris Smowton
c13229d581
Revert "Merge pull request #554 from xhd2015/accelerate_go_list"
...
This reverts commit e5a2b6081d , reversing
changes made to ee893b252c .
2021-09-16 17:16:59 +01:00
Sauyon Lee
f9ce06b4c0
Check for nil when getting package info
2021-09-02 11:25:58 -07:00
Sauyon Lee
7d3c504c3c
Fix godoc
2021-09-02 11:25:57 -07:00
Sauyon Lee
89c9c7060c
Remove unnecessary environment set
2021-09-02 11:25:57 -07:00
Sauyon Lee
6ed6193973
Remove redundant map assignments and fix some typos
2021-09-02 11:25:57 -07:00
xhd2015
8532605be7
Accelerating go-extractor by using 'go list -deps' instead of just 'go list'
...
Change-Id: Icc77214809a0bb8536d751f21194690d58663dc5
2021-09-02 11:25:57 -07:00
Chris Smowton
90c4b5d63f
Switch to using HTML entities for escaping
2021-04-21 21:14:39 -07:00
Chris Smowton
06c958e61f
Extractor: tolerate curly braces in struct field tags, directory names
...
These previously produced malformed TRAP. I have checked the other uses of GlobalID and don't see any others that should require escaping.
2021-04-21 21:14:39 -07:00
Chris Smowton
23b8af3a56
Tolerate empty-string CODEQL_PLATFORM
...
This is normal when invoked with tracing disabled, so we also don't log when this happens.
2021-03-29 11:34:50 +01:00
Chris Smowton
aef0a07a50
Prefer CODEQL_* environment variables when set
2021-03-25 16:20:16 +00:00
Chris Smowton
c2c88b0835
Unify two implementations of GetExtractorPath
...
This retains both their features:
* The new util.go one cached its result.
* The old go-autobuilder.go one worked under ODASA, where CODEQL_GO_EXTRACTOR_ROOT is unset but os.Executable is a useful substitute.
2021-03-25 11:24:39 +00:00
Sauyon Lee
1ca2164058
Add GetExtractorPath util function
2021-03-19 04:34:14 -07:00
Sauyon Lee
920f7153c8
autobuilder: Add dependency check
...
Sometimes build scripts succeed without installing dependencies, for
example if they are unrelated to Go or if they simply always exit
successfully. Therefore, added a check that dependencies at least
resolve before skipping dependency installation.
2020-11-09 02:13:48 -08:00
Sauyon Lee
2da89c6527
extractor: factor out run from autobuilder
2020-10-08 23:31:05 -07:00
Sauyon Lee
eaf5342b7d
Enable Go modules while determining module directory
2020-10-08 23:31:05 -07:00
Sauyon Lee
8f6b25e0ac
autobuilder: Use -mod=mod for vendor directories wihtout modules.txt
2020-08-26 11:25:30 +01:00
Sauyon Lee
6e5e9ce5de
Improve comments for extractor utility functions
2020-06-30 11:44:10 -07:00
Sauyon Lee
fa391b1516
extractor: Factor out common bits for running go list
2020-06-24 23:29:54 -07:00
Sauyon Lee
e25b882e42
Clarify some comments
...
As suggested in code review
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com >
2020-06-24 23:29:52 -07:00
Sauyon Lee
7863bb656e
Use the -mod argument from the build when calling go list
2020-06-24 23:29:49 -07:00
Sauyon Lee
296d2d5fd3
extractor: modify FileExists to check that the path isn't a directory
2020-06-24 23:29:48 -07:00
Sauyon Lee
3513c352e6
extractor: Factor out FileExists utility function
2020-06-24 23:29:48 -07:00
Sauyon Lee
f197975c6e
Extract packages more intelligently
...
We now extract packages that have the same module root as the specified packages, as determined by
the `go list` command.
2020-06-24 23:29:47 -07:00
Max Schaefer
510b6070c9
Introduce official environment variable for goroutine limiting.
...
We've had to tell people how to do this, so we should have a name for it that doesn't refer to a defunct company.
2020-04-02 10:45:52 +01:00