commit | e7b8e288b01a667dba87d7d2c584b950adb6200c | [log] [tgz] |
---|---|---|
author | Matt Stark <msta@google.com> | Tue Jul 25 06:29:28 2023 +0000 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jul 25 09:34:24 2023 +0000 |
tree | a0328467955e55d241e97f4a645f9492ae613d22 | |
parent | be836ab47c73ff0ab2ceb8f0df862053b88a935d [diff] |
Revert "Delete WORKSPACE" This reverts commit d96a7859e2898e6d8198dea3c2fae52da7f6ff8f. Reason for revert: Apparently this broke drydocks bazel build, and we're not using rules_cros anymore anyway, so this doesn't affect alchemy anymore Original change's description: > Delete WORKSPACE > > This allows it to work with alchemy. > > Change-Id: Ic741a4431c63161e2c272becb6956e160ea0d3d2 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/rules_cros/+/4190657 > Reviewed-by: George Burgess <gbiv@chromium.org> > Tested-by: Matt Stark <msta@google.com> Change-Id: Ieb4f2abe42db616d8e7372e04045275a8d52c3e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/rules_cros/+/4714167 Tested-by: Matt Stark <msta@google.com> Reviewed-by: Andrew Moylan <amoylan@chromium.org> Commit-Queue: Matt Stark <msta@google.com> Auto-Submit: Matt Stark <msta@google.com>
This repository provides common rules and configuration for Bazel projects in Chrome OS.
The code is this directory is experimental and under active development. Stability and functionality is not guaranteed :)
We use rust_analyzer to generate a rust-project.json
file in the workspace root, which allows vscode to understand your dependencies.
Simply install the rust_analyzer VSCode plugin, and then add the following to your .vscode/tasks.json
file, substituting TARGET for a label of any bazel target you want to depend on. VSCode will then analyze all the transitive dependencies of the specified targets.
For example, I might use the following line:
"args": ["run", "//rules_cros/toolchains/rust:gen_rust_project", "--", "//rules_cros/toolchains/rust/examples/use_local_crate/...", "//rules_cros/toolchains/rust/examples/hello_world:helllo_world"],
{ "version": "2.0.0", "tasks": [ { "label": "Generate rust-project.json", "command": "bazel", "args": ["run", "//rules_cros/toolchains/rust:gen_rust_project", "--", "<TARGET1>", "<TARGET2>", "..."], "options": { "cwd": "${workspaceFolder}" }, "group": "build", "problemMatcher": [], "presentation": { "reveal": "never", "panel": "dedicated", }, "runOptions": { "runOn": "folderOpen" } }, ] }
If you add a new file, you may need to manually re-run the task.