You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Process each action from Bazelisms -> file paths and their clang commands
803
849
# Threads instead of processes because most of the execution time is farmed out to subprocesses. No need to sidestep the GIL. Might change after https://github.com/clangd/clangd/issues/123 resolved
804
850
withconcurrent.futures.ThreadPoolExecutor(
805
851
max_workers=min(32, (os.cpu_count() or1) +4) # Backport. Default in MIN_PY=3.8. See "using very large resources implicitly on many-core machines" in https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor
Copy file name to clipboardExpand all lines: refresh_compile_commands.bzl
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,9 @@ refresh_compile_commands(
55
55
56
56
# refresh_compile_commands will automatically create a symlink for external workspaces at /external.
57
57
# You can disable this behavior with link_external = False.
58
+
59
+
# refresh_compile_commands does not work with --experimental_convenience_symlinks=ignore.
60
+
# For these workspaces, you can use absolute paths to the bazel build artifacts by setting rewrite_bazel_paths = True.
58
61
```
59
62
"""
60
63
@@ -71,6 +74,7 @@ def refresh_compile_commands(
71
74
exclude_external_sources=False,
72
75
update_gitignore=True,
73
76
link_external=True,
77
+
rewrite_bazel_paths=False,
74
78
**kwargs): # For the other common attributes. Tags, compatible_with, etc. https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes.
75
79
# Convert the various, acceptable target shorthands into the dictionary format
76
80
# In Python, `type(x) == y` is an antipattern, but [Starlark doesn't support inheritance](https://bazel.build/rules/language), so `isinstance` doesn't exist, and this is the correct way to switch on type.
# For Windows INCLUDE. If this were eliminated, for example by the resolution of https://github.com/clangd/clangd/issues/123, we'd be able to just use a macro and skylib's expand_template rule: https://github.com/bazelbuild/bazel-skylib/pull/330
149
156
# Once https://github.com/bazelbuild/bazel/pull/17108 is widely released, we should be able to eliminate this and get INCLUDE directly. Perhaps for 7.0? Should be released in the sucessor to 6.0
0 commit comments