5efaf5a4be
The default symlink location can cause slowdowns and wasted CPU cycles in VS Code and PyCharm/IntelliJ, as they try to watch Bazel's (large) build folder for changes. The issue can be mostly ameliorated in VS Code by excluding the symlinks using globs in settings like watcherExclude, but the Rust extension doesn't support globs, so each folder needs to be listed out separately. And because the product name symlink depends on the name of the directory you're building from, we can't just include the excludes in .vscode - it will depend on the folder the user is storing things. PyCharm and IntelliJ behave even worse here - they continue to monitor for changes in all folders of the repo, even if those folders have been marked as excluded in the project settings. Placing the folders into the IDE-global Editor>File Types>Ignored Files And Folders works around this, but again we run into troubles making this work out of the box, especially with the product name in the symlink. One option would be to turn the symlinks off completely. They are not required for building, and for scripting/debugging, we can get the folder locations via 'bazel info'. But with that approach, we would no longer be able to symlink build products into the source tree, as we do for things like the generated backend methods and translations, so we'd lose code completion for them that way. Another option would be to place the symlinks in .bazel/ inside the repo. That solves the VS Code case (in conjunction with a workspace config file), but doesn't fully fix IntelliJ/PyCharm. The only remaining option I can see is to place the symlinks outside the repo. Bazel won't expand ~ in the symlink path, so we can't use something like ~/.cache/bazel/anki to place the files near the other build files. So we end up having to have the files written to ../bazel/anki, in the repo's parent folder. Not very clean, but I don't see a better alternative at the moment. .gitignore is still ignoring bazel-*, as currently bazel-dist and bazel-pkg will be created when building/packaging. They should be fairly innocuous, but we may want to rename them at one point. Other changes: - add missing symlink for pylib hooks - add a sample .user.bazelrc file
Symbolic link
1 line
54 B
Python
Symbolic link
1 line
54 B
Python
../../../../bazel/anki/bin/qt/aqt/forms/setlang_qt6.py |