-
Notifications
You must be signed in to change notification settings - Fork 329
CLion: include cache #7834
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
base: master
Are you sure you want to change the base?
CLion: include cache #7834
Conversation
4163454
to
fc050f2
Compare
cf10f69
to
7f7a92e
Compare
df09749
to
9618aa5
Compare
Windows failure caused by:
Maybe separate rules foreign cc tests, seem to be more restrictive then the general virtual includes tests. |
this.sources.addAll(cIdeInfo.ruleContext().headers()); | ||
this.sources.addAll(cIdeInfo.ruleContext().textualHeaders()); | ||
|
||
// TODO: add compilation context direct headers here too? (they can contain duplicates, filter?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we update this comment with the testonly usage and drop todo then?
|
||
private const val MODULES_DIRECTORY = "modules" | ||
|
||
abstract class AspectModuleWriter : AspectWriter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add documentation here
addAllowedVfsRoots(roots); | ||
|
||
Assertions.assertVfsLoads(myBazelInfo.executionRoot(), roots); | ||
HeavyPlatformTestCase.cleanupApplicationCaches(myProject); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's leave a comment why do we want to have it here or maybe remove it if we don't need
|
||
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
http_archive( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's consider switching from sqlite to our own simple library built with cmake, I guess we can store it right in this repo and drop BUILD.sqlite.bazel and directly use configure_cmake
?
.map(TargetKey::toString) | ||
.collect(joining("\n")); | ||
|
||
IssueOutput.warn(String.format("cc target depends on %d apple cc toolchains", entry.getKey())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's preserve the old message as it looks to be more descriptive
fun resolve(target: TargetKey, artifact: ArtifactLocation): Path? { | ||
if (!artifact.isGenerated) return null | ||
|
||
val path = target.cacheDirectory().resolve(stripVirtualPrefix(artifact.relativePath)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npe on resolve
var size = 0L | ||
|
||
try { | ||
for (item in Files.walk(path)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
if (Files.exists(cacheDirectory)) { | ||
// I have a feeling that this will be really slow on Windows, so let's try to avoid this | ||
NioFiles.deleteRecursively(cacheDirectory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's leave a comment that we'd like to later replace it with rename and delete async
if (importSettings != null) { | ||
BlazeDataStorage.getProjectDataDir(importSettings).toPath().resolve(CC_INCLUDES_CACHE_DIR) | ||
} else { | ||
Path.of(project.basePath, CC_INCLUDES_CACHE_DIR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npe from basepath
|
||
private fun findVirtualIncludesDirectory(bazelBin: Path, label: Label): Path? { | ||
val path = bazelBin | ||
.applyIf(label.externalWorkspaceName() != null) { resolve("external").resolve(label.externalWorkspaceName()) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXTERNAL_BAZEL_DIR
The PR adds a cache for generated headers and
_virtual_include
directories of a target to avoid placing header search paths into the execution root.Header search paths in the execution root can cause unnecessary files to be loaded into the VFS, since indexing code might recursively iterate over all files in these directories.