-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go/tools: add gopackagesdriver #2858
Commits on Apr 3, 2021
-
go/tools: add gopackagesdriver
This commit introduces the GOPACKAGESDRIVER for rules_go Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a67afe0 - Browse repository at this point
Copy the full SHA a67afe0View commit details -
go/tools/gopackagesdriver: Go <= 1.16 compatibility
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bdd0556 - Browse repository at this point
Copy the full SHA bdd0556View commit details
Commits on Apr 4, 2021
-
go/tools/gopackagesdriver: don't use compiled Go files
Those files are generated and will end up in the temporary mod cache, which isn't available later on. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 76e6753 - Browse repository at this point
Copy the full SHA 76e6753View commit details -
go/tools/gopackagesdriver: explicitely ignore the C package
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5a53ae2 - Browse repository at this point
Copy the full SHA 5a53ae2View commit details -
go/tools/packagesdriver: fetch package name from the sources
This handles some edges cases in which the import path last part is not the package name. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d2b527a - Browse repository at this point
Copy the full SHA d2b527aView commit details -
go/tools/gopackagesdriver: ensure bazel doesn't print out output files
It's no use, and it can be a significant amount of files, so disable it. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ce61882 - Browse repository at this point
Copy the full SHA ce61882View commit details -
go/tools/gopackagesdriver: don't index by package ID or files
The indexing by ID was never used except for iterating on all packages. The file index isn't used either since the whole graph is dumped anyway. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b08da87 - Browse repository at this point
Copy the full SHA b08da87View commit details -
go/tools/builders/stdliblist: ensure CC is absolute
Needed when in a CGo environment for go list to work Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5dd1e0e - Browse repository at this point
Copy the full SHA 5dd1e0eView commit details -
go/tools/gopackagedriver: fetch stdlib info from inner most target
Fetch the stdlib JSON from the deepest target, and cascade it upward so that transitions are applied properly. Also, this enables applying the aspect to a target that depends on a go_binary, such as a cc_binary with proper transition applied. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 168e90d - Browse repository at this point
Copy the full SHA 168e90dView commit details -
go/tools/gopackagesdriver: move bazel UI related flags to the bazel type
This is more correct. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 331470a - Browse repository at this point
Copy the full SHA 331470aView commit details
Commits on Apr 5, 2021
-
go/tools/gopackagesdriver: add keep_going when building
This ensures that all possible packages are built Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 29d0b78 - Browse repository at this point
Copy the full SHA 29d0b78View commit details -
go/tools/gopackagesdriver: remove dependecy on x/tools/packages
The key types have to be copied and paster so might has well remove the dependency altogether. In the process, rework how the LoadMode is passed. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 529b5ab - Browse repository at this point
Copy the full SHA 529b5abView commit details -
Configuration menu - View commit details
-
Copy full SHA for a0eeeec - Browse repository at this point
Copy the full SHA a0eeeecView commit details -
go/tools/gopackagesdriver: use BUILD_WORKSPACE_DIRECTORY for workspace
Since the packages driver is meant to be run via `bazel run`, it's simpler to leverage BUILD_WORKSPACE_DIRECTORY. It's one less parameter. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 79f0cb8 - Browse repository at this point
Copy the full SHA 79f0cb8View commit details -
go/tools/gopackagesdriver: simplify bazel bin lookup
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8f76121 - Browse repository at this point
Copy the full SHA 8f76121View commit details -
go/tools/gopackagesdriver: simplify BEP JSON file handling
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1203bea - Browse repository at this point
Copy the full SHA 1203beaView commit details -
go/tools/gopackagesdriver: explicit errors
Will be easier when debugging. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2657063 - Browse repository at this point
Copy the full SHA 2657063View commit details -
go/tools/gopackagesdriver: check for stdlibjson before returning it
Sometimes if the aspects explores nodes that won't have go_ rules, there is no inner stdlib_json to fetch. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 859a3b1 - Browse repository at this point
Copy the full SHA 859a3b1View commit details
Commits on Apr 6, 2021
-
go/tools/gopackagesdriver: fix wrong error format
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2190ab6 - Browse repository at this point
Copy the full SHA 2190ab6View commit details -
go/tools/gopackagesdriver: try to speed up bazel queries
Use special flags in order to speed up the bazel query Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d69fad2 - Browse repository at this point
Copy the full SHA d69fad2View commit details -
go/tools/gopackagesdriver: add missing error check
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4719e91 - Browse repository at this point
Copy the full SHA 4719e91View commit details
Commits on Apr 7, 2021
-
go/tools/gopackagesdriver: fix typos in comments
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 07ad711 - Browse repository at this point
Copy the full SHA 07ad711View commit details -
go/tools/gopackagesdriver: unquote imports with strconv.Unquote
Cleaner than triming. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b3af1b1 - Browse repository at this point
Copy the full SHA b3af1b1View commit details
Commits on Apr 8, 2021
-
go/tools/gopackagesdriver: pass show_result only to a build command
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 079bb2a - Browse repository at this point
Copy the full SHA 079bb2aView commit details -
go/tools/gopackagesdriver: remove unrelated comment
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 070b4c3 - Browse repository at this point
Copy the full SHA 070b4c3View commit details -
go/tools/packagesdriver: split targets with fields
Empty string becomes handled, and multiple spaces too. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 69fef40 - Browse repository at this point
Copy the full SHA 69fef40View commit details
Commits on Apr 17, 2021
-
go/tools/gopackagesdriver: rename x as export_file
Clearer that way Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fb2df68 - Browse repository at this point
Copy the full SHA fb2df68View commit details -
go/tools/gopackagesdriver: make GoStdLib._list_json private
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0d01dc3 - Browse repository at this point
Copy the full SHA 0d01dc3View commit details -
go/tools/gopackagesdriver: don't reallocate absolute paths slice
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c36a5eb - Browse repository at this point
Copy the full SHA c36a5ebView commit details -
go/tools/gopackagesdriver: packageToPackage -> flatPackageForStd
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2773277 - Browse repository at this point
Copy the full SHA 2773277View commit details -
go/tools/builders: fix stdliblist comment
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5923382 - Browse repository at this point
Copy the full SHA 5923382View commit details -
go/tools/builder: add GOMODCACHE to stdliblist builder
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b962df0 - Browse repository at this point
Copy the full SHA b962df0View commit details -
go/tools/builder: stdlib and stdliblist tags should be comma separated
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 98338cc - Browse repository at this point
Copy the full SHA 98338ccView commit details -
go/tools/gopackagesdriver: rename to new gazelle convention
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bcd9713 - Browse repository at this point
Copy the full SHA bcd9713View commit details -
go/tools/gopackagesdriver: add file headers
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b81ac13 - Browse repository at this point
Copy the full SHA b81ac13View commit details -
go/tools/gopackagesdriver: cleaner iteration on optional fields
Cleaner than hasattr Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ae8788f - Browse repository at this point
Copy the full SHA ae8788fView commit details -
go/tools/gopackagesdriver: ensure BEP file paths work on windows too
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5b80ccd - Browse repository at this point
Copy the full SHA 5b80ccdView commit details -
go/tools/gopackagesdriver: remove == false expressions
Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 34ee2be - Browse repository at this point
Copy the full SHA 34ee2beView commit details -
go/tools/gopackagesdriver: don't panic when an error is returned
simply print it and exit(1) Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dfe668a - Browse repository at this point
Copy the full SHA dfe668aView commit details -
go/tools/gopackagesdriver: properly compute roots using a pattern mat…
…cher Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 81166a8 - Browse repository at this point
Copy the full SHA 81166a8View commit details -
go/tools/gopackagesdriver: walk packages from root
Since root packages are now properly computed, walk the package graph from them. This saves on JSON payload size a bit. Signed-off-by: Steeve Morin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 32aba61 - Browse repository at this point
Copy the full SHA 32aba61View commit details