Commit Graph

51 Commits

Author SHA1 Message Date
Damien Elmes
1b48d3e3d1 Mention eslint --fix in docs
https://github.com/ankitects/anki/pull/1847#issuecomment-1120954217
2022-05-10 11:39:15 +10:00
Damien Elmes
95dbf30fb9 updates to the build process and binary bundles
All platforms:

- rename scripts/ to tools/: Bazelisk expects to find its wrapper script
(used by the Mac changes below) in tools/. Rather than have a separate
scripts/ and tools/, it's simpler to just move everything into tools/.
- wheel outputs and binary bundles now go into .bazel/out/dist. While
not technically Bazel build products, doing it this way ensures they get
cleaned up when 'bazel clean' is run, and it keeps them out of the source
folder.
- update to the latest Bazel

Windows changes:

- bazel.bat has been removed, and tools\setup-env.bat has been added.
Other scripts like .\run.bat will automatically call it to set up the
environment.
- because Bazel is now on the path, you can 'bazel test ...' from any
folder, instead of having to do \anki\bazel.
- the bat files can handle being called from any working directory,
so things like running "\anki\tools\python" from c:\ will work.
- build installer as part of bundling process

Mac changes:

- `arch -arch x86_64 bazel ...` will now automatically use a different
build root, so that it is cheap to switch back and forth between archs
on a new Mac.
- tools/run-qt* will now automatically use Rosetta
- disable jemalloc in Mac x86 build for now, as it won't build under
Rosetta (perhaps due to its build scripts using $host_cpu instead of
$target_cpu)
- create app bundle as part of bundling process

Linux changes:

- remove arm64 orjson workaround in Linux bundle, as without a
readily-available, relatively distro-agonstic PyQt/Qt build
we can use, the arm64 Linux bundle is of very limited usefulness.
- update Docker files for release build
- include fcitx5 in both the qt5 and qt6 bundles
- create tarballs as part of the bundling process
2022-02-10 19:23:07 +10:00
Damien Elmes
78ac1fe3cc split IDE docs into separate file; recommend VS Code 2022-01-24 19:46:09 +10:00
Damien Elmes
37771fac7e clarify wheel building and mention how to free up space 2022-01-24 16:51:29 +10:00
Damien Elmes
23f0fa23b9 fix formatting in docs/ 2022-01-21 21:50:20 +10:00
roxgib
578ef6b2bc
Remove outdated info about VS Code (#1614)
Pylance is now the default for Python on VS Code, so it should no longer be necessary to suggest switching to it.
2022-01-21 21:31:23 +10:00
Damien Elmes
4c49337700 tweaks to development.md 2021-12-24 14:12:36 +10:00
Damien Elmes
fc93a3d4d7 Python 3.10 not usable on Windows
No winrt wheel is available yet

https://forums.ankiweb.net/t/editor-did-init-left-buttons-hook-is-not-working/14703
2021-11-08 19:23:00 +10:00
Damien Elmes
7f0384b968 mention glibc requirements
https://forums.ankiweb.net/t/wheel-not-supported-on-the-platform-which-built-it/14432
2021-10-26 18:08:08 +10:00
Damien Elmes
ab01677ff1 add dockerfiles for amd64 and arm64 builds 2021-10-23 20:42:16 +10:00
Damien Elmes
a80a267cff //ts:format now runs on current working directory, instead of entire repo 2021-10-23 15:48:33 +10:00
Damien Elmes
3b8b71b815 minor tweak to new-platforms.md, and run prettier on docs 2021-10-23 15:40:45 +10:00
Damien Elmes
ee644e08a3 fixes and documentation for Linux ARM64
+ add qt6 dep to wheel install docs
+ remove x86_64 constraint on orjson
2021-10-23 15:22:24 +10:00
Damien Elmes
ad2c17aced docs: the old TS flakiness should be gone, but renames are a problem 2021-10-18 22:24:06 +10:00
Damien Elmes
bdbcb6d7aa default to a vendored copy of Python
Brings Python in line with our other dependencies, and means users
no longer need to install it prior to building, or deal with
issues caused by having the wrong version available.
2021-10-15 22:14:05 +10:00
Damien Elmes
46b80ca773 move node_modules into root folder [action required]
Recommend removing ts/node_modules folder before attempting to
build after this update.

This moves ts/node_modules into the root of the project to work around
https://github.com/ankitects/anki/pull/1405#issuecomment-936213861

Also fixes the sass errors shown when running scripts/svelte-check
2021-10-07 11:42:27 +10:00
Damien Elmes
e9c7b2287f bump minimum Python to 3.9 2021-10-04 15:05:15 +10:00
RumovZ
470312ca87 Update proto format call in docs 2021-07-22 10:08:50 +02:00
Damien Elmes
ecd207bf26 add a brief architecture file 2021-07-20 11:59:39 +10:00
Damien Elmes
fc0035306c drop Rust Analyzer Bazel rule
With proper excludes set up, starting it outside of Bazel is similarly
fast, and unit tests work correctly. It also makes initial Bazel startup
faster, as the Rust sources no longer need to be fetched.
2021-07-19 23:27:11 +10:00
Damien Elmes
2bfb0c9286 update to latest rules_rust
- bumps rust version to 1.53
- drops support for incremental building, which is currently
disabled in stable Rust releases due to bugs. 'cargo check' can still
be used to quickly check things compile
2021-06-21 13:09:36 +10:00
cherryblossom
92fe68abfe
fix documentation links 2021-06-03 16:51:03 +10:00
Damien Elmes
01049b1289 add an updated script to run mypy as a daemon
Sadly doesn't work on Windows
2021-04-14 18:10:38 +10:00
Damien Elmes
1cc63f9267 update to latest rules_rust incremental compilation 2021-04-09 12:48:24 +10:00
Damien Elmes
6f7a4bf29e update rules_rust with worker refactor
If you were using the optional Rust worker support, please see the
change to development.md
2021-03-30 17:24:51 +10:00
Damien Elmes
89d249b3b6 update to the latest rules_rust + security framework update 2021-03-27 19:28:19 +10:00
Damien Elmes
f0f2da0f56 doc tweaks 2021-01-31 20:54:43 +10:00
Damien Elmes
d411aba909 clarify test running in docs 2021-01-19 10:26:00 +10:00
Damien Elmes
c6e23dbdc5 document extra formatter 2021-01-09 17:42:26 +10:00
Damien Elmes
3dad3c90d0 add .sql file formatter
Uses the logic from the sqltools VSCode add-on, with a workaround
for the use of 'type' in some table columns.

By detecting the presence of 'BUILD_WORKSPACE_DIRECTORY' we can tell
if the rule is running in test mode or was run directly, avoiding the
need for separate check and fix rules. It might be nice to extend this
to other formatting rules in the future as well.
2021-01-09 14:22:49 +10:00
Damien Elmes
2e7213f8b0 add some porting notes 2020-12-31 14:03:38 +10:00
Damien Elmes
86108cca55 mention deleting ts/node_modules in the docs
https://forums.ankiweb.net/t/strange-behaviour-in-the-html-editor/5796/6
2020-12-22 09:29:30 +10:00
Damien Elmes
32b6e8e198 document ANKI_PROFILE_CODE and add bazel command to run snakeviz 2020-12-17 12:03:24 +10:00
Damien Elmes
ecb7c1482f use QtMultimedia for recording instead of PyAudio
The unmute-on-first-duration-change approach is to try to prevent
clicks/pops that can happen at the start of recordings. If it doesn't
solve the problem, we may need to drop down to the lower-level
QAudioInput().

Closes https://github.com/ankitects/help-wanted/issues/23

May fix https://forums.ankiweb.net/t/anki-crashes-periodically-after-clicking-record-audio-button/5824,
which I suspect was caused by processEvents()
2020-12-16 19:33:25 +10:00
Damien Elmes
4b04905ff8 mention requirements.txt in editing docs 2020-12-16 15:38:02 +10:00
Damien Elmes
06399446e3 add some code editing/completion docs 2020-12-16 14:16:08 +10:00
Damien Elmes
b80f33d14d document worker and disable it by default 2020-12-11 21:04:06 +10:00
Damien Elmes
0cbb60169c simplify wheel building 2020-12-10 20:27:21 +10:00
Damien Elmes
5f099e5514 minor doc tweaks 2020-12-09 19:59:06 +10:00
Damien Elmes
9d9452ee2e remove unneeded activate from docs 2020-12-08 09:12:32 +10:00
Damien Elmes
fcdc51aace add explicit entry point to start Anki; update docs 2020-12-07 11:22:31 +10:00
Damien Elmes
1566a9be98 remove explicit python3.9 reference due to pylint
3.8 will be used if available
2020-12-02 11:23:01 +10:00
Damien Elmes
52ca4ab854 audio doc updates
[skip ci]
2020-11-13 09:14:12 +10:00
Damien Elmes
b71f55dcc5 make 'bazel run ts:format' work
We're cheating a bit by having it fix files in qt's data folder
as well, but this makes it easier to share the config file.
2020-11-12 20:49:00 +10:00
Damien Elmes
5bb3d7c114 format_fix -> format; rename svelte-check for consistency 2020-11-12 20:19:32 +10:00
Damien Elmes
bd6fb9b234 cleaning note is not specific to Windows 2020-11-12 20:06:35 +10:00
Damien Elmes
f8f2839b55 add pyqtwebengine to wheel deps and bump minimum required pyqt 2020-11-11 10:33:49 +10:00
Damien Elmes
61bf2f80eb doc updates 2020-11-05 20:25:48 +10:00
Damien Elmes
7cd2e9618f doc updates 2020-11-04 14:01:14 +10:00
Damien Elmes
5e602c553f enforce eol normalization in gitattributes 2020-11-01 15:24:25 +10:00