Anki/rslib/src
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
..
backend Add pylib/browser.py for literal config keys 2021-07-05 12:44:48 +02:00
card fix clippy lints for latest Rust 2021-06-21 13:09:36 +10:00
collection update undo skipping; exclude deck/tag expand/collapse 2021-06-25 09:16:15 +10:00
config Add pylib/browser.py for literal config keys 2021-07-05 12:44:48 +02:00
deckconfig expose scheduler js option in deck config 2021-06-24 14:38:10 +10:00
decks update undo skipping; exclude deck/tag expand/collapse 2021-06-25 09:16:15 +10:00
error add back in missing check for upload size 2021-06-29 10:50:03 +10:00
media update to latest rusqlite 2021-06-25 16:22:21 +10:00
notes fix clippy lints for latest Rust 2021-06-21 13:09:36 +10:00
notetype update most rust deps; skip rusqlite 2021-06-25 15:35:25 +10:00
revlog tidy up Rust imports 2021-04-18 18:38:54 +10:00
scheduler PEP8 cards.py 2021-06-27 12:12:23 +10:00
search update to latest rusqlite 2021-06-25 16:22:21 +10:00
stats in/out -> request/response 2021-06-20 15:49:20 +10:00
storage zero out graves before comparison, instead of at creation 2021-06-30 10:08:52 +10:00
sync zero out graves before comparison, instead of at creation 2021-06-30 10:08:52 +10:00
tags update undo skipping; exclude deck/tag expand/collapse 2021-06-25 09:16:15 +10:00
undo update undo skipping; exclude deck/tag expand/collapse 2021-06-25 09:16:15 +10:00
adding.rs expose undoable config changes to frontend; refresh sidebar 2021-05-21 17:50:41 +10:00
backend_proto.rs refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
browser_table.rs Rename violet to pink 2021-06-01 18:14:43 +02:00
cloze.rs Add check for out-of-place/missing clozes 2021-06-12 10:02:21 +02:00
dbcheck.rs update to latest rusqlite 2021-06-25 16:22:21 +10:00
findreplace.rs expose undoable config changes to frontend; refresh sidebar 2021-05-21 17:50:41 +10:00
i18n.rs drop the legacy enum from rslib, and pass separate module/message idx 2021-03-27 11:56:31 +10:00
latex.rs tidy up Rust imports 2021-04-18 18:38:54 +10:00
lib.rs fix test scheduler undo + implement look-ahead 2021-05-14 22:16:53 +10:00
log.rs tidy up Rust imports 2021-04-18 18:38:54 +10:00
markdown.rs render deck description with markdown; strip images 2021-02-06 15:02:40 +10:00
ops.rs update undo skipping; exclude deck/tag expand/collapse 2021-06-25 09:16:15 +10:00
preferences.rs allow customization of default search text 2021-06-24 11:24:30 +10:00
prelude.rs support undo for (renamed) unbury_deck() action 2021-04-30 20:03:20 +10:00
serde.rs tidy up Rust imports 2021-04-18 18:38:54 +10:00
template.rs fix clippy lints for latest Rust 2021-06-21 13:09:36 +10:00
template_filters.rs Pronounce "[...]" as "blank" with TTS 2021-05-20 09:42:38 +02:00
text.rs fix clippy lints for latest Rust 2021-06-21 13:09:36 +10:00
timestamp.rs fix test scheduler undo + implement look-ahead 2021-05-14 22:16:53 +10:00
types.rs update scheduling ops 2021-04-06 16:38:42 +10:00
version.rs tidy up Rust imports 2021-04-18 18:38:54 +10:00