Anki is a smart spaced repetition flashcard program
Find a file
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
.buildkite add header check to Linux CI 2021-04-13 23:08:57 +10:00
.github/ISSUE_TEMPLATE add issue template config.yml 2021-02-19 14:11:21 +10:00
cargo add back in missing check for upload size 2021-06-29 10:50:03 +10:00
docs refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
ftl add back in missing check for upload size 2021-06-29 10:50:03 +10:00
pip update to latest mypy 2021-06-16 16:04:59 +10:00
platforms add linux_arm64 platform 2020-12-29 18:40:39 +10:00
proto refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
pylib refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
qt refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
rslib refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
scripts add script to run Rust Analyzer using Bazel's build products 2021-05-04 20:06:42 +10:00
ts refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
.bazelignore initial Bazel conversion 2020-11-01 14:26:58 +10:00
.bazelrc fix release builds 2021-06-24 15:01:32 +10:00
.bazelversion update pinned Bazel version to 4.0 release 2021-01-21 19:58:41 +10:00
.gitattributes try again to improve GitHub's language stats 2021-01-20 13:20:45 +10:00
.gitignore add script to run Rust Analyzer using Bazel's build products 2021-05-04 20:06:42 +10:00
bazel.bat initial Bazel conversion 2020-11-01 14:26:58 +10:00
BUILD.bazel add script to run Rust Analyzer using Bazel's build products 2021-05-04 20:06:42 +10:00
Cargo.lock add back in missing check for upload size 2021-06-29 10:50:03 +10:00
Cargo.toml add a valid, empty file so the check action works in Rust Analyzer 2021-05-05 15:53:27 +10:00
CONTRIBUTORS Add hook to onDelete in AddonsDialog (#1232) 2021-06-15 10:01:29 +10:00
defs.bzl refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
late_deps.bzl add script to run Rust Analyzer using Bazel's build products 2021-05-04 20:06:42 +10:00
LICENSE move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
pkgkey.asc add public key for release signing 2018-09-18 10:40:45 +10:00
protobuf.bzl refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
python.bzl use PYTHON_SYS_EXECUTABLE for setting path to Python 2020-12-23 21:53:13 +10:00
README.md fix build badge 2021-06-24 09:21:56 +10:00
repos.bzl update translations 2021-07-04 21:41:34 +10:00
run proper fix for __pycache__ folders preventing remove on ./run 2021-01-12 18:47:08 +10:00
run.bat enable Python warnings when running 2020-12-16 14:59:04 +10:00
WORKSPACE refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00

Anki

Build status

This repo contains the source code for the computer version of Anki.

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see https://betas.ankiweb.net/

For more information on building, please see Development.