Commit graph

29 commits

Author SHA1 Message Date
Damien Elmes
4388ca0a2e 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
f0ce1cfc9d 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
e3b53fc078 split out remaining tags, stats, media and rendering 2021-07-10 23:16:18 +10:00
Damien Elmes
5255409093 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
14263c7a79 move protobuf into separate folder in preparation for multiple files 2021-07-09 21:02:40 +10:00
Damien Elmes
171e2c4b46 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
Damien Elmes
585072635d bump version 2021-05-04 16:24:28 +10:00
Damien Elmes
cc91868092 move esbuild into separate repo
Most of our changes have been upstreamed, but the toolchain change
probably won't be merged soon, and a separate git repo will make it
easier to track upstream changes.

@hgiesel output_css=True will need to be changed to output_css="foo.css"
instead
2021-04-15 10:53:49 +10:00
Damien Elmes
fb1111623f update to latest esbuild 2021-04-07 14:54:40 +10:00
Damien Elmes
d52a34d414 update to latest Rust 2021-03-27 20:49:10 +10:00
Damien Elmes
2338998304 update to the latest rules_rust + security framework update 2021-03-27 19:28:19 +10:00
Damien Elmes
9dfa0301a2 bump version 2021-03-27 16:35:03 +10:00
Damien Elmes
06b0b4d68b vendor Svelte rules
The separate repo made it difficult to update the rules, and made things
more complicated than they needed to be.
2021-03-20 15:04:19 +10:00
Damien Elmes
647291f0cc bump version 2021-03-10 11:11:45 +10:00
Damien Elmes
b2b2d76ca7 bump version 2021-03-09 14:44:20 +10:00
Damien Elmes
fbc341ecff bump version
2.1.40 is another bugfix release; a 2.1.41 beta is expected to follow
within a few days
2021-02-07 13:56:11 +10:00
Damien Elmes
f3582e40c8 bump version
2.1.39 will become a cherry-picked bugfix release
2021-01-30 14:38:58 +10:00
Damien Elmes
e9dee35885 add clang-format for backend.proto formatting 2021-01-09 17:08:50 +10:00
Damien Elmes
ffd28e00e0 bump version 2020-12-26 10:36:42 +10:00
Damien Elmes
7e39686cd9 use protobuf binaries to reduce initial compile times 2020-12-23 19:49:44 +10:00
Damien Elmes
ccc99d0ccf bump version 2020-12-16 20:29:45 +10:00
Damien Elmes
45b5b7cc3a update rules_rust + persistent_worker 2020-12-10 15:35:37 +10:00
Damien Elmes
ca755175a2 bump version 2020-12-09 12:53:11 +10:00
Damien Elmes
2c0a8a25c5 trial rust worker 2020-12-03 09:28:14 +10:00
Damien Elmes
f4470f7a9e update Rust version 2020-11-25 09:02:49 +10:00
Damien Elmes
1c8dce3b6d add bazel version check for external consumers 2020-11-11 10:33:49 +10:00
Damien Elmes
4f8b19dcfb fix external consumption of ts rules, and simplify import path 2020-11-05 11:01:52 +10:00
Damien Elmes
f738053c35 fixes for consuming rust lib from external repo 2020-11-04 19:20:49 +10:00
Damien Elmes
e4ba941cf1 move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
Renamed from setup.bzl (Browse further)