I was getting this message when running
`tools/regenerate_dependency_summaries.sh`
```
warning: `/home/ben/application-services/main/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
Updating git repository `https://github.com/martinthomson/ohttp.git`
```
- Use the `data_path` rather than `cache_path` for the suggest DB. This
is prep for for storing the suggestion dismissal data in the DB, which
should not be reset on schema upgrades.
- Don't always drop and recreate the database when the schema upgrades.
Instead, I'm hoping we can use the code from `SuggestDao.clear` to
delete the suggestion data so that we re-ingest it.
- Other than adding the `dismissed_suggestions` table, this doesn't
implement any of the suggestion dismissal functionality.
Added boilerplate for UniFFI, error handling, databases, etc. I tried
to follow the best practices from other application-services components.
Created the initial types and methods for the API. I think all of these
should be considered works-in-progress. It seems likely that some or
all of them will change as we implement the functionality.
Added some code to read / write URL interest data from a test binary
file currently stored in the repo. This is also a WIP, at the very
least it needs to change to download the data from remote settings.
Parse the `full_keyword` field for downloaded AMP / wikipedia
suggestions and store it in the DB.
Use the field for AMP suggestions rather than the current
hueristic-based code.
Don't use this field for Wikimedia suggestions. This is because the
full keyword field is just the full article title, which is already
included in the suggestion.
This helps with keeping track of the last ingested item for each
of the record types.
Update components/suggest/src/store.rs
Co-authored-by: Nan Jiang <njiang028@gmail.com>
Update components/suggest/src/store.rs
Co-authored-by: Nan Jiang <njiang028@gmail.com>
Update components/suggest/src/store.rs
Co-authored-by: Nan Jiang <njiang028@gmail.com>
Handle the case where a public event results in an immediate public
state transition (i.e. the initial state of the internal state machine
is `Complete(new_state)`). Copied the code that does this from
`handle_internal_event` to `handle_public_event`.
Also reworked a couple of the breadcrumb messages. In particular, I got
confused because was both the public and internal event handlers sent
out breadcrumbs that look the same.
Transition to the `Disconnected` state in this case to match the
behavior of android-components.
I'm not sure which behavior is better or worse, but this one will make
the state machine checker happy.