Commit graph

8 commits

Author SHA1 Message Date
249fcc5066 Split api crate into api_structs and api 2021-03-25 20:19:40 +01:00
dcf40db225 Update activitystreams to 0.7.0-alpha.11 2021-03-09 18:14:15 +01:00
Andrew Yoon
e78ba38e94
Use URL type in most outstanding struct fields (#1468)
* Use URL type in most outstanding struct fields

This fixes all known remaining cases where url fields are stored as
plain strings, with the exception of form fields where empty strings
are used as sentinels (see `diesel_option_overwrite_to_url`).

Tested for regressions in the federated docker setup attempting to
exercise all changed fields, including through apub federation.

Fixes #1385

* Add migration to fix blank-string post.url values to be null

This also then fixes #602

* Address review feedback

- Fixed some unwraps and err message formatting
- Bumped the `url` library to 2.2.1 to fix a bug with serde error
  messages
- Add unit tests for the two diesel option override functions
- Fix migration teardown by adding a no-op

* Rename lemmy_db_queries::Url to lemmy_db_queries::DbUrl

* fix compile error

* box PostOrComment variants
2021-03-02 12:41:48 +00:00
3bdd78f341 Rename lemmy_structs to lemmy_api_structs 2021-03-01 14:08:41 +01:00
Andrew Yoon
600ae662a5 Support plain cargo test and disable unused doctests for speed
Since DB tests execute diesel migrations automatically, concurrent
execution causes flaky failures from simultaneous migrations. This can
be worked around using `cargo test --workspace -- --test-threads=1`,
which is what the CI config does, but this is not intuitive for
newcomer developers and unnecessarily slows down the test suite for
the majority of tests which are safe to run concurrently. This fixes
this issue by integrating with the small test crate `serial_test` and
using it to explicitly mark DB tests to run sequentially while
allowing all other tests to run in parallel.

Additionally, this greatly improves the speed of `cargo test` by
disabling doc-tests in all crates, since these are aren't currently
used and cargo's doc-test pass, even when no doc-tests exist, has
significant overhead. On my machine, this change significantly
improves test suite times by about 85%, making it much more practical
to develop with tools like `cargo watch` auto-running tests.
2021-02-25 15:44:30 -05:00
1857f02af8 Moving back tokio and reqwest. 2021-02-01 21:54:23 -05:00
10f0b3b877 Trying to upgrade lemmys deps. 2021-02-01 15:56:37 -05:00
3b64c58198 Move most code into crates/ subfolder 2021-01-20 16:21:27 +01:00
Renamed from lemmy_apub/Cargo.toml (Browse further)