anki/qt/aqt
Damien Elmes 5efaf5a4be move Bazel convenience symlinks outside of repo folder
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
2022-01-23 19:18:44 +10:00
..
browser fix: AttributeError: 'QMouseEvent' object has no attribute 'pos' (#1598) 2022-01-16 15:29:04 +10:00
data move Bazel convenience symlinks outside of repo folder 2022-01-23 19:18:44 +10:00
forms move Bazel convenience symlinks outside of repo folder 2022-01-23 19:18:44 +10:00
operations Backend Custom Study (#1600) 2022-01-20 14:25:22 +10:00
qt tweak qrc deprecation warning 2021-12-04 14:35:49 +10:00
__init__.py Fix Alt-Gr and add shortcut to create copy again (#1544) 2021-12-10 17:52:08 +10:00
_macos_helper.py implement a basic native macOS audio recorder 2021-12-07 18:48:24 +10:00
about.py Update about.py (#1533) 2021-12-07 09:01:30 +10:00
addcards.py Remove individual .html files + other refactorings (#1588) 2022-01-16 15:05:35 +10:00
addons.py Add last version check for add-on updates (#1608) 2022-01-21 21:43:54 +10:00
BUILD.bazel run buildifier/buildozer to tidy up BUILD files 2021-12-14 09:18:24 +10:00
changenotetype.py Remove individual .html files + other refactorings (#1588) 2022-01-16 15:05:35 +10:00
clayout.py Allow <audio> to play without user interaction in accordance to autoplay setting v2 (#1539) 2021-12-08 08:08:56 +10:00
colors.py move Bazel convenience symlinks outside of repo folder 2022-01-23 19:18:44 +10:00
customstudy.py Backend Custom Study (#1600) 2022-01-20 14:25:22 +10:00
dbcheck.py PEP8 collection.py 2021-06-27 15:12:22 +10:00
deckbrowser.py retire the v1 scheduler 2021-11-24 14:12:56 +10:00
deckchooser.py Fix chooser label not being updated when current notetype/deck renamed (#1452) 2021-10-25 13:23:06 +10:00
deckconf.py convert invariant assertions to if statements 2021-11-25 17:47:50 +10:00
deckdescription.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
deckoptions.py Remove individual .html files + other refactorings (#1588) 2022-01-16 15:05:35 +10:00
editcurrent.py PEP8 editorMode 2022-01-12 15:01:43 +10:00
editor.py PEP8 editorMode 2022-01-12 15:01:43 +10:00
emptycards.py Fix memory leak in AnkiWebView (#1510) 2021-11-29 12:31:37 +10:00
errors.py catch all recording errors; mention permission 2021-06-02 12:20:40 +10:00
exporting.py fix check for user exporting into data folder on Windows 2021-11-25 09:30:17 +10:00
fields.py Editor Field Descriptions (#1476) 2021-11-06 09:42:48 +10:00
filtered_deck.py convert invariant assertions to if statements 2021-11-25 17:47:50 +10:00
flags.py use Qt search path instead of resource system 2021-10-12 16:17:08 +10:00
gui_hooks.py fix qt/ pylints 2021-01-07 16:21:50 +10:00
hooks_gen.py move Bazel convenience symlinks outside of repo folder 2022-01-23 19:18:44 +10:00
importing.py dump traceback to console on importing exception 2022-01-02 09:47:44 +10:00
legacy.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
main.py Add last version check for add-on updates (#1608) 2022-01-21 21:43:54 +10:00
mediacheck.py fix media trash throttling; decrease delay 2021-12-04 09:10:31 +10:00
mediasrv.py Add _raw methods for all methods in the backend (#1594) 2022-01-21 21:32:39 +10:00
mediasync.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
modelchooser.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
models.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
mpv.py update platform checks (eg isWin -> is_win) + devMode 2021-11-25 09:06:16 +10:00
notetypechooser.py Remove all_names in notetypechooser (#1501) 2021-11-23 10:27:57 +10:00
overview.py avoid duplicate work in overview screen 2021-11-25 09:01:02 +10:00
package.py ignore a spurious mypy error 2021-10-28 19:19:37 +10:00
pinnedmodules.py update platform checks (eg isWin -> is_win) + devMode 2021-11-25 09:06:16 +10:00
preferences.py update platform checks (eg isWin -> is_win) + devMode 2021-11-25 09:06:16 +10:00
profiles.py Add last version check for add-on updates (#1608) 2022-01-21 21:43:54 +10:00
progress.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
py.typed mark anki and aqt modules as having typing info 2020-01-13 13:03:37 +10:00
reviewer.py Add Create Copy to reviewer and use current card's deck (#1569) 2021-12-31 16:45:30 +10:00
schema_change_tracker.py add a bunch of return types 2021-02-01 23:53:23 +10:00
sound.py Only warn once about missing av player (#1592) 2022-01-16 13:46:01 +10:00
stats.py Fix memory leak in AnkiWebView (#1510) 2021-11-29 12:31:37 +10:00
studydeck.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
switch.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
sync.py convert invariant assertions to if statements 2021-11-25 17:47:50 +10:00
tagedit.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
taglimit.py Backend Custom Study (#1600) 2022-01-20 14:25:22 +10:00
taskman.py avoid importing directly from PyQt5 where possible 2021-10-15 10:47:53 +10:00
theme.py fix: try catch excepton in get_windows_dark_mode and global cache the check (#1587) 2022-01-16 14:07:28 +10:00
toolbar.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
tts.py update platform checks (eg isWin -> is_win) + devMode 2021-11-25 09:06:16 +10:00
undo.py fix redo menu item showing undo text 2021-08-04 10:28:45 +10:00
update.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
utils.py Fix is_zoom_event() (#1607) 2022-01-20 11:56:12 +10:00
webview.py fall back on a sans-serif font if the system Linux font is unavailable 2022-01-22 16:43:58 +10:00
wheel_description.txt move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
winpaths.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00