Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use Anki 2.1.54's code #202

Merged
merged 61 commits into from
Jun 27, 2022
Merged

Commits on Jun 17, 2022

  1. Migrate most rsdroid code into rslib patch

    - Reuses existing protobuf infrastructure to greatly cut down on the
    JNI boilerplate
    - Ensures all calls have errors handled, and happen behind a mutex
    - Removes separate downgrade + open11 calls in favour of a flag to
    the standard collection opening routine
    - Various code cleanups
    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    a8649ed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6fb558a View commit details
    Browse the repository at this point in the history
  3. BackendV1 -> Backend

    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    be9cbf6 View commit details
    Browse the repository at this point in the history
  4. Use messages for certain backend inputs

    Matches desktop behaviour
    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    1e13e6f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cb6cbaa View commit details
    Browse the repository at this point in the history
  6. Generate translation accessors as part of the build

    Accessed with backend.tr.someTranslationName()
    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    9bfe3d2 View commit details
    Browse the repository at this point in the history
  7. Add i18n submodule in new path

    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    3a37197 View commit details
    Browse the repository at this point in the history
  8. Automatically update submodule as part of i18n build

    - Extracted from pinned sha in upstream repo
    - Maintainer needs to commit change to submodule
    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    179da19 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    96299a3 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d05c0e9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    93e90e8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c8111ee View commit details
    Browse the repository at this point in the history
  13. Install+upgrade protobuf

    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    c938d3e View commit details
    Browse the repository at this point in the history
  14. Update rslib commit

    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    3476441 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    fc2e373 View commit details
    Browse the repository at this point in the history
  16. Bump version number

    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    1408efd View commit details
    Browse the repository at this point in the history
  17. Remove unused JsonDatabaseCursor

    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    10d6fa0 View commit details
    Browse the repository at this point in the history
  18. Fix warnings and some lints

    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    cfd2685 View commit details
    Browse the repository at this point in the history
  19. Tweak version

    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    2c7cdaa View commit details
    Browse the repository at this point in the history
  20. Update Rust libs

    dae committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    0e489f2 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2022

  1. Interface tidy-ups

    - Reduce the numbers of factories, and provide some helper routines
    in AnkiSupportSQLiteDatabase to create Rust-based and Framework-based
    instances.
    - BackendFactory now provides static methods to create a backend,
    and supports configuring the default languages and schema version (
    which the AnkiAndroid code will use)
    - Backend instances have their schema version set at creation, instead
    of collection open.
    dae committed Jun 18, 2022
    Configuration menu
    Copy the full SHA
    70999d5 View commit details
    Browse the repository at this point in the history
  2. Bump version

    dae committed Jun 18, 2022
    Configuration menu
    Copy the full SHA
    8b2d06e View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2022

  1. Update easy-testing instructions

    dae committed Jun 19, 2022
    Configuration menu
    Copy the full SHA
    80b60f7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5499f2f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ec0226b View commit details
    Browse the repository at this point in the history
  4. Stream library to avoid Windows test OOM

    I'm surprised it can't handle a 45MB alloc. Switched to a streaming
    approach, that requires reading the file twice in the initial write case.
    dae committed Jun 19, 2022
    Configuration menu
    Copy the full SHA
    2ed5c23 View commit details
    Browse the repository at this point in the history
  5. Fix extraction of panic strings

    dae committed Jun 19, 2022
    Configuration menu
    Copy the full SHA
    ef3ddae View commit details
    Browse the repository at this point in the history
  6. Add buildinfo.txt file

    The sync code expects to find the version number in a buildinfo.txt
    file. For now, check it into source control so that Bazel is only required
    when bumping the anki dependency (or you could edit the file manually)
    dae committed Jun 19, 2022
    Configuration menu
    Copy the full SHA
    7794f3f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1bcd7e7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1ef4484 View commit details
    Browse the repository at this point in the history
  9. Reduce logging verbosity

    Large collections dump thousands of lines in the logs when showing the
    deck picker.
    dae committed Jun 19, 2022
    Configuration menu
    Copy the full SHA
    c9903eb View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9794ba9 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2022

  1. Tweaks for Robolectric case

    - Add an ineffective lock to ensureSetup()
    - Document why it doesn't work, and why the error needs to be swallowed
    in loadPath
    - Don't attempt to load the library normally when running under
    Robolectric
    dae committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    c05e6d1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2780dfb View commit details
    Browse the repository at this point in the history
  3. Make it easier to use a venv

    dae committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    57769a9 View commit details
    Browse the repository at this point in the history
  4. Rename easy-testing, tweak docs

    dae committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    2768c42 View commit details
    Browse the repository at this point in the history
  5. Use zip of desktop artifacts in build

    Instead of checking buildinfo.txt and the web files into this repo,
    we should either generate them as part of the build, or rely on a pinned
    pre-generated file. The latter is the easier short-term solution, as it
    requires minimal updates to CI, and won't balloon out the build times.
    It's more work when bumping versions though, so in the long time AD may
    want to consider adopting Bazel in this repo once this code has sufficiently
    proven itself.
    
    There's probably room for improvement in the download/unpack task - I'll
    leave that for someone with more Gradle experience. I am not able to test
    the artifact build/upload from the repo fork, so have temporarily placed the
    generated file on ankiweb.
    dae committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    4c3eea4 View commit details
    Browse the repository at this point in the history
  6. Revert "Use zip of desktop artifacts in build"

    This reverts commit 2828381.
    
    This has a few issues that need resolving before it's usable:
    
    - Need to tell Gradle that unpackAnkiArtifacts should be run prior
    to the cargo lines
    - downloadAndPrepareArtifacts chokes on clean build because rsdroid/build
    does not exist; probably needs creating if missing
    dae committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    60a4233 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1a2afad View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    41cc1f5 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2022

  1. Log stdout/stderr to ease println() debugging

    Android sends it to /dev/null by default
    dae committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    dd19004 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f65cd99 View commit details
    Browse the repository at this point in the history
  3. Update rslib for backup fix

    dae committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    4ce057b View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2022

  1. 3 Configuration menu
    Copy the full SHA
    1760ab9 View commit details
    Browse the repository at this point in the history
  2. Warn when executing SQL statements on main thread; remove other logging

    If they block due to a concurrent operation, the UI will freeze until
    it completes, so these operations should be moved to a backend thread
    over time (in many cases, there's a backend operation that can be used
    instead)
    dae committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    75e19bd View commit details
    Browse the repository at this point in the history
  3. Report backend requests that happen on UI thread

    Reveals deck list's renderPage() invokes a lot of SQL queries, and
    isCurrentlySelectedDeck() queries the current deck each time.
    dae committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    6955d8d View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2022

  1. Log caller for SQL statements

    dae committed Jun 24, 2022
    Configuration menu
    Copy the full SHA
    bd65477 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2022

  1. Configuration menu
    Copy the full SHA
    5d29116 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2022

  1. Configuration menu
    Copy the full SHA
    21a43f5 View commit details
    Browse the repository at this point in the history
  2. Update OVERVIEW.md

    I tried using the site to import the docs/source files, but it told me
    it wasn't a valid file type, so I've just removed the diagrams for now.
    dae committed Jun 26, 2022
    Configuration menu
    Copy the full SHA
    8c024b5 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2022

  1. Enable Kotlin extensions to generated protobuf

    Makes working with messages easier in the AnkiDroid repo
    dae committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    442db0a View commit details
    Browse the repository at this point in the history
  2. Add two more language maps

    dae committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    cd1f797 View commit details
    Browse the repository at this point in the history
  3. Check Bazel is installed

    dae committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    43fa4dc View commit details
    Browse the repository at this point in the history
  4. Clarify venv+pip

    dae committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    c6bf63b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d5c26f4 View commit details
    Browse the repository at this point in the history
  6. Add stringcase to doctor

    dae committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    d70ded0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    979695c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3e3f0af View commit details
    Browse the repository at this point in the history
  9. Update to Anki 2.1.54

    dae committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    b1114d8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8714da7 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    bf699dc View commit details
    Browse the repository at this point in the history