Commit Graph

64 Commits

Author SHA1 Message Date
Damien Elmes
1cdf0b1e9d tweak linux.md and add forum link 2021-09-02 20:52:55 +10:00
RumovZ
470312ca87 Update proto format call in docs 2021-07-22 10:08:50 +02:00
Damien Elmes
fe5845266b public API comment 2021-07-20 12:07:01 +10: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
372a28be29 rename workspace
I'd forgotten that Bazel "helpfully" adds __init__.py files into folders
that match the workspace name, breaking imports.
2021-07-10 23:58:53 +10:00
Damien Elmes
616db33c0e refactor protobuf handling for split/import
In order to split backend.proto into a more manageable size, the protobuf
handling needed to be updated. This took more time than I would have
liked, as each language handles protobuf differently:

- The Python Protobuf code ignores "package" directives, and relies
solely on how the files are laid out on disk. While it would have been
nice to keep the generated files in a private subpackage, Protobuf gets
confused if the files are located in a location that does not match
their original .proto layout, so the old approach of storing them in
_backend/ will not work. They now clutter up pylib/anki instead. I'm
rather annoyed by that, but alternatives seem to be having to add an extra
level to the Protobuf path, making the other languages suffer, or trying
to hack around the issue by munging sys.modules.
- Protobufjs fails to expose packages if they don't start with a capital
letter, despite the fact that lowercase packages are the norm in most
languages :-( This required a patch to fix.
- Rust was the easiest, as Prost is relatively straightforward compared
to Google's tools.

The Protobuf files are now stored in /proto/anki, with a separate package
for each file. I've split backend.proto into a few files as a test, but
the majority of that work is still to come.

The Python Protobuf building is a bit of a hack at the moment, hard-coding
"proto" as the top level folder, but it seems to get the job done for now.

Also changed the workspace name, as there seems to be a number of Bazel
repos moving away from the more awkward reverse DNS naming style.
2021-07-10 19:17:05 +10:00
Damien Elmes
4ab0820bbc mention JS flakiness in Mac/Linux instructions 2021-06-21 13:23:03 +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
5a59789a29 contributing.md update 2021-02-03 16:06:34 +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
633034b24d add local sync server frontend 2021-01-13 11:42: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
f9e939aaff Make orjson optional again
While 32 bit platform support is probably not going to come back,
this allows Anki to run on other architectures orjson doesn't support.
2021-01-07 09:44:40 +10:00
Damien Elmes
65f90fa3a8 docs: musl and local node 2021-01-02 09:49:41 +10:00
Damien Elmes
eecdc07c68 add some Python source deps 2021-01-01 08:49:29 +10:00
Damien Elmes
2e7213f8b0 add some porting notes 2020-12-31 14:03:38 +10:00
Damien Elmes
32a5892327 fix typo in docs
Thanks to Gustavo for the report

Closes #876
2020-12-30 13:54:27 +10:00
Damien Elmes
58db3866fe
Merge pull request #868 from Arthur-Milchior/contributing_sh
Contributing shell code in backtick
2020-12-28 10:46:34 +10:00
Damien Elmes
1633d6bd9f remove reference to 'make pull-i18n', it's no longer required 2020-12-27 18:26:14 +10:00
Arthur Milchior
f7ad281170 Contributing shell code in backtick
Currently, on ebc77985d8/docs/contributing.md the
whole code is on a single line. Copying does not work, as the test is commented
2020-12-27 08:57:40 +01:00
Damien Elmes
355e4cd519 use PYTHON_SYS_EXECUTABLE for setting path to Python 2020-12-23 21:53:13 +10:00
Damien Elmes
7a3e21daad revert docs change; rollup issues occurred again in CI 2020-12-23 16:27:45 +10:00
Damien Elmes
02d7e55f9b update to rules_nodejs 3.0.0
Seems to fix the rollup issues on Windows.
2020-12-23 16:05:15 +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
6faaecbb5a mention clang 2020-12-11 20:56:08 +10:00
Damien Elmes
fe4fda7039 remove obsolete docker instructions 2020-12-10 20:34:48 +10:00
Damien Elmes
c942dbc998 add note about ccache
https://forums.ankiweb.net/t/building-with-ccache/5677
2020-12-10 20:28:33 +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
fd7e8a7e4b fix typo in docs 2020-12-08 09:08:51 +10:00
Damien Elmes
39cc224d99 document issues with Python in /usr/local 2020-12-07 21:06:52 +10:00
Damien Elmes
bce1f56dde document optimized builds and add helper script 2020-12-07 11:50:03 +10:00
Damien Elmes
fcdc51aace add explicit entry point to start Anki; update docs 2020-12-07 11:22:31 +10:00
W43GVG
78514cb575 Link for contribution help is updated 2020-12-06 21:45:57 +01: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
1c5f94d46f strip out unused gettext refs 2020-11-18 13:22:51 +10:00