Commit Graph
10542 Commits
Author SHA1 Message Date
holger krekel abdb02c361 add a test for testing that export works when an account has active threads 2019-07-03 21:31:20 +02:00
holger krekel 92d39642e6 bump rust-version 2019-07-03 21:13:59 +02:00
holger krekel 799ba8a5db fix rust-formatting 2019-07-03 20:38:17 +02:00
holger krekel 8367a03b22 fix some lint issues, and run it during circle-CI 2019-07-03 20:32:01 +02:00
holger krekel 4378608617 convert some log infos and guard bindings against some misuse 2019-07-03 20:17:35 +02:00
holger krekel adcb9d6069 fixed: make export/import work with blob-files again
also add some more logging.
2019-07-03 20:02:05 +02:00
holger krekel 191d11e719 export and import full DC database state 2019-07-03 18:59:56 +02:00
Simon Laux 464d0f4831 Update Cargo.toml 2019-07-02 14:11:58 +02:00
Floris Bruynooghe d0c7f63809 Merge pull request #165 from deltachat/fixtests1
get liveconfig tests working, add imap/smtp connected events and tests
2019-07-02 13:25:20 +02:00
holger krekel e597aade10 fix comment 2019-07-02 10:05:54 +02:00
holger krekel 08bade2c7c fix fmt 2019-07-02 08:36:15 +02:00
holger krekel 2c26f4f2ab convert the last two unsafe event emissions in smtp.rs 2019-07-02 01:45:48 +02:00
holger krekel 7a053b9f93 add SMTP_CONNECTED and IMAP_CONNECTED events 2019-07-01 22:27:44 +02:00
holger krekel 183a49eca0 remove superflous debug attempts 2019-07-01 20:11:35 +02:00
holger krekel 384822b5eb replace unsafe use of dc logging with info! macro as per advise from @flub 2019-07-01 18:57:37 +02:00
holger krekel 06e16c81f9 Wip 2019-07-01 18:06:16 +02:00
holger krekel d1593f0258 fix run-integration-test.sh to run without arguments 2019-07-01 15:57:00 +02:00
Floris Bruynooghe 6ccc75b1ed Arbitrarily bump the version
This allows me to create a new tag and play wity building flatpak
builds for this tag.
1.0.0-alpha.1
2019-06-30 19:48:44 +02:00
Floris Bruynooghe 69975ae460 Merge pull request #159 from deltachat/fix_script
little PR to fix the install_py_bindings.sh script after @flub's changes
2019-06-28 09:21:11 +02:00
holger krekel 419add4902 little PR to fix the install_py_bindings.sh script after @flub's changes 2019-06-24 15:05:54 +02:00
björn petersen bc8eabca27 Merge pull request #156 from deltachat/add-license
chore: add missing license
2019-06-19 20:08:35 +02:00
dignifiedquire 9f3512d2f1 chore: add missing license
Closes #151
2019-06-19 19:02:42 +02:00
Floris Bruynooghe 003d07328e Merge pull request #155 from deltachat/flub-priv-sqlite-cobj
Make the SQLite struct opaque
2019-06-18 23:54:17 +02:00
Floris Bruynooghe f8d428c308 Make the SQLite struct opaque
With the API changes already done, notably .is_open(), the
implementation of the sqlite can and should now be private.

This also doesn't need to be #[repr(C)] anymore since the C API does
not need to access the fields in the struct.
2019-06-18 23:20:01 +02:00
Floris Bruynooghe 2adbdf7d85 Merge pull request #143 from deltachat/flub-rusty-sql
Refactor the internal sql interface somewhat
2019-06-17 22:58:36 +02:00
Floris Bruynooghe a6102d1039 Refactor the internal sql interface somewhat
Experiment with refactoring the internal sql interface a bit.  My
original goal was to modify the schema and thus refactor to a state
where it would be sane to write tests for dc_sqlite_open() (and/or
however it ends up refactored) to assert schame changes before/after.
2019-06-17 22:31:36 +02:00
Floris Bruynooghe 7debe799d4 Merge pull request #153 from deltachat/flub-null-cb
Make the callback optional again
2019-06-17 20:38:46 +02:00
Floris Bruynooghe db9bc15d3e Make the callback optional again
The C API allows passing a NULL pointer is for the callback function.
However when calling the callback nothing checks for this null pointer
and thus things fail badly.  Even worse since the C API is defined
using an "fn pointer" rather than a "*-ptr" or raw pointer to the
function rust does not realise this can be invalid and therefore the
typechecker does not catch this even though there are no unsafe casts.

Fix this by making the callback an Option in rust, this can be easily
checked when calling.  Also add a Context.call_cb() function which
simplifies calling the callback, hides the weird syntax due to the
function pointer and makes the call a little easier.  Finally it also
means the option checking is only needed in one place.

For the C API this needs to check if this is a NULL pointer or not,
this is implicitly done by rust using the "nullable pointer
optimisation":
https://doc.rust-lang.org/nomicon/ffi.html#the-nullable-pointer-optimization
2019-06-17 20:06:15 +02:00
Floris Bruynooghe 70bfc6d5e0 Merge pull request #152 from deltachat/flub-warns
Clean up some warnings and use newer nightly compiler
2019-06-16 17:34:06 +02:00
Floris Bruynooghe dc0de47b4b Clean up some warnings and use newer nightly compiler
This stops using the deprecated libc::uint32_t and libc::uint64_t
types in favour of the native u32 and u64 types.

It also uses a newer nightly compiler to get rid of the incorrect
"unused no_mangle" warning when compiling incrementally.

Finally the newer compiler prefers us to be explicit when implementing
traits using the new dyn keyword.
2019-06-16 15:32:15 +02:00
Floris Bruynooghe 3a524503f0 Merge pull request #146 from deltachat/flub-static-py
For development statically link dcc-rs
2019-06-12 23:09:29 +02:00
Floris Bruynooghe 4d24ce8f85 Link to dcc-rs dependencies
When linking against the static library we need to also include all
dynamic libs this still depends on.  Thanks to the old CI system
spotting this!
2019-06-12 22:44:56 +02:00
Floris Bruynooghe 4ccd39b769 Build the right cargo lib based on the target 2019-06-10 23:05:22 +02:00
Floris Bruynooghe 4d8914cb3c Do not add deps already present in setup.py
We don't need those.  I was just flailing about trying to get things
to work early on.
2019-06-10 23:02:48 +02:00
Floris Bruynooghe e72fc98585 Merge pull request #147 from Ampli-fier/master
Info about Rust and Cargo + some minor changes
2019-06-10 22:52:06 +02:00
Ampli-fier 58ca0998e0 Info about Rust and Cargo + some minor changes 2019-06-10 21:44:20 +02:00
Floris Bruynooghe 12e74a0645 Allow selecting the target to build
This is useful to investiage coredumps.
2019-06-10 18:07:23 +02:00
Floris Bruynooghe 5090b4d24b For development statically link dcc-rs
This links the python bindings statically to libdeltachat.a if the
DCC_RS_DEV environment variable is set to the project's root.  This is
a little simpler then requiring the manual CFLAGS and LD_LIBRARY_PATH
tweaking.

It also adds a script to easily invoke the integration tests locally
without forgetting steps.
2019-06-10 17:25:13 +02:00
Friedel Ziegelmayer af8d056206 refactor: remove dc-strbuilder 2019-06-08 17:13:25 +02:00
Friedel Ziegelmayer 4e41dbf5ab refactor: reduce dependencies on libc 2019-06-08 17:13:05 +02:00
Friedel Ziegelmayer 39b82c2607 chore(ci): simplify appveyor
* reduce targets on appveyor to x86_64-pc-windows-msvc
* remove submodule update, not needed
* add cargo update
* run tests with --release for speed up
* prune debug folder from target cache
* debug folder pruned, no longer need rm

Closes #137
2019-06-08 13:40:26 +02:00
Floris Bruynooghe 0bce754adf Merge pull request #134 from flub/as_str
Rename to_str() -> as_str() to match stdlib naming convention
2019-06-08 10:57:24 +02:00
Lars-Magnus Skog 2ea69263e4 debug folder pruned, no longer need rm 2019-06-08 04:36:55 +02:00
Lars-Magnus Skog f515b8a8f0 prune debug folder from target cache 2019-06-08 04:28:38 +02:00
Lars-Magnus Skog 2881b8217d run tests with --release for speed up 2019-06-08 04:07:34 +02:00
Lars-Magnus Skog 5dd5e04200 add cargo update 2019-06-08 04:01:09 +02:00
Lars-Magnus Skog 1aa591777d remove submodule update, not needed 2019-06-08 04:00:51 +02:00
Lars-Magnus Skog bcc2eb720d chore: reduce targets on appveyor to x86_64-pc-windows-msvc 2019-06-08 04:00:05 +02:00
Lars-Magnus Skog a32a275d73 feat: Add utility to convert OsStr to CString (#136)
* Add utility to convert OsStr to CString

This is approach seems acceptable in the context of deltachat, it
should work correctly on unix and on Windows requires paths to be
valid utf-8.

* Use failure crate for error types

* Add OsStrExt impl for Path, fix windows and update docs

- Adds an OsStrExt impl for Path directly, a little more convenience.

- Fix the windows code to actually use the right function name.  Test
  the impl function on unix too since that was the point of having it
  implemented in a separate function to begin with.

- Improve the docs, do hyperlinks a bit better.

* Another attempt at learing to type

Having your compiler in the cloud is just painful.

* Do not treat this as a fatal error

When PRs are made from forks the passwords are unavailable.  We don't
want CI to fail because of this.

* Implement using the AsRef<OsStr> trait

This means any type with implements this trait will get this
implementation, thus covering both OsStr and Path instead of having
duplicate implementations for those like before.

* fix format
2019-06-08 03:04:30 +02:00
Friedel Ziegelmayer 02e7dc022b feat: remove compile date
It has few use only and the problem to stand in the way of reproducible builds.
2019-06-07 22:41:48 +02:00