Commit Graph
10602 Commits
Author SHA1 Message Date
Alexander Krotov c116d6f73f Use Rust for instead of C while in dc_array test 2019-07-21 21:27:49 +02:00
Alexander Krotov a7c8ebc089 Replace DC_ARRAY_MAGIC #define with a constant 2019-07-21 21:26:27 +02:00
Floris Bruynooghe 7774052911 Use DC_PARAM_* constants everywhere
Also document each type they store.  This makes existing code a little
more readable and gives some hints towards refactoring this.
2019-07-21 20:25:52 +02:00
Floris Bruynooghe 68888f6d1f Also silence warnings in test code
We can be a bit more liberal with .unwrap() here.
2019-07-21 12:03:04 +02:00
Alexander Krotov 3dfd623db7 Use constants instead of hardcoded values in dc_mimefactory.rs 2019-07-21 00:37:58 +02:00
Floris Bruynooghe 31d2bc7401 Silence warnings from ignored Result values
For a few of the locations where error handling is done correctly this
does the right thing.  For most other places it gracefully ignores any
issues which is what the original code did as well.  Errors are
already logged by the called functions in those cases.
2019-07-21 00:32:33 +02:00
Floris Bruynooghe 5ee8f8cb59 Several fixes to the intergration tests
- Pass extra_link_args when using an installed libdeltachat
- Allow setting the liveconfig by envvar
- Show lifeconfig path in the pytest summary line
- Pass required envvars through tox
- Fix broken liveconfig passing in run-integration-test.sh
2019-07-20 23:28:23 +02:00
Floris Bruynooghe d1825956b2 Merge pull request #198 from link2xt/top_evil_rs_shebang
src/top_evil_rs.py: fix shebang to always use Python 3 and make it executable
2019-07-20 19:17:44 +02:00
Alexander Krotov 30ca377586 src/top_evil_rs.py: fix shebang to always use Python 3 and make it executable
PEP-0394 (https://www.python.org/dev/peps/pep-0394/) recommends to use more specific shebangs.
For example, Debian allows /usr/bin/python to be configured to python2 via `update-alternatives python`, but the script does not work with Python 2.
2019-07-20 19:43:05 +03:00
holger krekel f58b1d66c2 add a little script to compute rust-evilness 2019-07-19 10:15:04 +02:00
dignifiedquire 0c5015d92b chore: release v1.0.0-alpha.3 1.0.0-alpha.3 2019-07-18 00:34:46 +02:00
dignifiedquire ab2d2e7583 chore: prepare for using cargo-release 2019-07-18 00:33:07 +02:00
dignifiedquire c11ac46dce chore: add Cargo.lock
Closes #145
2019-07-18 00:29:01 +02:00
Friedel Ziegelmayer 8a0fc609e6 The big sqlite refactor
* refactor: safe sql access

* Clean up the worst rebase mistakes

* Some more progress on the rebase fallout and this branch

* upgrade and compile again

* cleanup from rebase

* example of how to prepare now

* rebase fixes

* add sql.query_map

* less preparation

* more improvements in sql code

* fix string truncation

* more prepare conversions

* most prep done

* fix tests

* fix ffi

* fix last prepares

* fix segfaults and some queries

* use r2d2 pool

* fix dc_job sql call, to reduce contention

* try newer rust

* No more vararg printing (drop dc_log_)

* ignore expected errors

* fix: uses exists instead of execute where needed

* fix: get_contacts logic was broken

* fix: contact creation

* test on 32bit linux

* ci: try running 32bit without cross

* undo 32bit tests

* refactor: rename dc_sqlite3 to sql

* fix: safer string conversions

* more string fixes

* try fixing appveyor build to 64bit

* chore(ci): hardcode target

* chore(ci): appveyor

* some cleanup work

* try fix darwin

* fix and improve sql escaping

* fix various bugs

* fix chat deletion

* refactor: cleanup config values and move to their own file

* refactor: move more methods onto the sql struct

* dont panic on failed state loading

* first round of cr

* one more cr fix

* stop using strange defaults

* remove unused escapes
2019-07-18 00:24:45 +02:00
holger krekel 3e3403d3d7 try using setuptools_scm for automatic versioning based on py-* tags (#187)
* try using setuptools_scm for automatic versioning based on py-* tags

* circument problem with pip-wheel isolation and setuptoosl_scm

* always provide version, address @flub comment
2019-07-14 09:58:51 +02:00
holger krekel 46c64b2511 Merge pull request #189 from deltachat/fixosx
try fix darwin
2019-07-14 09:57:52 +02:00
holger krekel aa82644392 fix py27 2019-07-14 09:16:51 +02:00
holga f00b617c23 try fix darwin 2019-07-13 18:44:44 +02:00
holger krekel 04ee9dde2c Merge pull request #181 from deltachat/improve_receive_imf1
improve dc_receive_imf and friends a little (part 1)
2019-07-10 19:54:22 +02:00
holger krekel cae0d666bd Merge pull request #184 from deltachat/fix_py
fix home page of bindings
2019-07-10 18:16:32 +02:00
holger krekel 2691028422 fix home page of bindings 2019-07-10 17:41:16 +02:00
Floris Bruynooghe 205493f89d Merge pull request #183 from deltachat/prep0600
prepare 0.600.0 release
py-0.600.0
2019-07-10 16:38:55 +02:00
holger krekel 3bca349194 prepare 0.600.0 release 2019-07-10 16:10:23 +02:00
Floris Bruynooghe deb160cce9 Merge pull request #182 from deltachat/flub-dc-chat-rename2
Rename dc_chat_t to Chat
2019-07-10 15:57:37 +02:00
holger krekel 669476afd3 fix comment 2019-07-10 12:06:59 +02:00
holger krekel b810b5a8f8 other cast as per @dignifiedquire comment -- also convert some logging along the way 2019-07-10 11:54:29 +02:00
holger krekel 6d17de05b2 also convert lookup_field function to use a &str param isntead of char* 2019-07-10 11:43:16 +02:00
holger krekel e3fb0a23c6 get rid of c version of dc_mimeparser_lookup_field completely 2019-07-10 11:32:50 +02:00
Floris Bruynooghe 4c646dc1e0 Rename dc_chat_t to Chat
This clears the way to start working on making the functions safe.
But small PRs are good PRs so let's get this rename out of the way and
have future PRs less noisy.

Also stop making this #[repr(C)] and start making fields that are not
used private. Lastly clean up some comments by moving them or
deleting them, so they make sense again after the translation.
2019-07-09 21:46:31 +02:00
holger krekel d67dd9cc33 convert another carray 2019-07-09 21:04:23 +02:00
holger krekel b93f5aa0b6 minimize casting 2019-07-09 20:55:29 +02:00
holger krekel 6c4b9e79c7 convert created_db_entries into a Rust vector instead of using low-level carray 2019-07-09 19:31:51 +02:00
holger krekel 95437d726e some streamlinings, after advise by @dignifedquire 2019-07-09 17:39:05 +02:00
Floris Bruynooghe 816fa1df9b test: ignore expensive tests by default
This makes interactively running the tests a much more pleasant
experience rather than something one dreads.  These tests will still
be run on the CI.  To run these manually run:

cargo test [TESTNAME] -- --ignored
2019-07-09 13:36:16 +02:00
björn petersen 11eb86c77f Merge pull request #177 from deltachat/fix176
fix #176 by transforming unsafe dc_log_info calls -- i think the unsafe
2019-07-06 22:50:47 +02:00
holger krekel c2ca30cc16 fix #176 by transforming unsafe dc_log_info calls -- i think the unsafe
referencing via &jobthread.name was the culprit but not sure ;)
2019-07-06 22:26:26 +02:00
dignifiedquire f336166867 fix(deps): disable default features 2019-07-06 17:35:19 +02:00
holger krekel 692b779896 Merge pull request #173 from deltachat/actests
test and fix Autocrypt Setup Message flow
2019-07-06 12:32:56 +02:00
holger krekel 09a675a9cf Merge pull request #175 from deltachat/fix-ringbuf
feat: add better feature configurations
2019-07-06 12:03:53 +02:00
dignifiedquire fd5cba7242 fixup 2019-07-06 11:32:15 +02:00
dignifiedquire 5c53bb5ed7 fixup 2019-07-06 11:31:46 +02:00
dignifiedquire 184b3c8e91 undo version bump 2019-07-06 11:30:45 +02:00
dignifiedquire 286d1a99aa fixup 2019-07-06 11:29:13 +02:00
dignifiedquire 4fe99b21c9 feat: add better feature configurations 2019-07-06 11:25:01 +02:00
holger krekel 2aa81a7a9a speed up test teardown by now waiting for threads to finish ...
and remove a debug statement
2019-07-05 23:12:11 +02:00
Hocuri f671b25cbc refactor: make dc_jobthread_t safe 2019-07-05 21:17:57 +02:00
holger krekel 3d7be47adf fix rust format 2019-07-05 20:05:08 +02:00
holger krekel 27c8bb64c8 remove some debuging 2019-07-05 19:26:40 +02:00
dignifiedquire 4c95664992 fix and improve key import 2019-07-05 19:12:08 +02:00
holger krekel f7d13fd12f comment on when it passes 2019-07-05 16:32:26 +02:00