crate testing

3 views
Skip to first unread message

Tim Kilbourn

unread,
Jul 27, 2017, 2:25:08 AM7/27/17
to rust-f...@fuchsia.com
I wrote a little test program (in Rust of course) to download the top N crates by downloads and run 'fargo test' on them to see what works on Fuchsia and what doesn't. Here's the list for N=30:

Successes: ["matches", "serde", "semver", "url", "num_cpus", "libc", "thread_local", "num-traits", "thread-id", "strsim", "num", "env_logger", "lazy_static", "bitflags", "unicode-normalization"]

Failures:  ["time", "gcc", "log", "pkg-config", "byteorder", "aho-corasick", "kernel32-sys", "rustc-serialize", "winapi", "memchr", "rand", "regex", "regex-syntax", "winapi-build", "utf8-ranges"]


Some are obvious (winapi, etc) and most others fail because rand doesn't work (yet), but this should be a fun way to see how we're doing on crate coverage.

As an aside, writing this was a really fun exercise in combining futures, git2, hyper, rayon, serde, and tokio. I almost wrote it in python until Rob Tsuk convinced me that writing it in Rust would be more fun, and I'm impressed with how quickly it all came together. I'll try to clean it up and put it somewhere on fuchsia.googlesource.com soon.

Taylor Cramer

unread,
Jul 27, 2017, 12:29:00 PM7/27/17
to Tim Kilbourn, rust-f...@fuchsia.com
Nice work! One note-- did you look into using Reqwest instead of raw hyper? It's higher-level and easier to use, and probably supports everything you need.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia+unsubscribe@fuchsia.com.
To post to this group, send email to rust-f...@fuchsia.com.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.com/d/msgid/rust-fuchsia/CAKUMrDsnZpwM7oFkOWAp0WCm4izFNZ5%2BHw7%3Dx2fwDgquR4DaTA%40mail.gmail.com.

Tim Kilbourn

unread,
Jul 27, 2017, 12:30:28 PM7/27/17
to Taylor Cramer, rust-f...@fuchsia.com
No, I didn't. Hyper was a little crazy for doing a single GET so I'll check it out. It was a good excuse to try hyper though.

On Thu, Jul 27, 2017 at 9:29 AM 'Taylor Cramer' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
Nice work! One note-- did you look into using Reqwest instead of raw hyper? It's higher-level and easier to use, and probably supports everything you need.

On Wed, Jul 26, 2017 at 11:25 PM, 'Tim Kilbourn' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
I wrote a little test program (in Rust of course) to download the top N crates by downloads and run 'fargo test' on them to see what works on Fuchsia and what doesn't. Here's the list for N=30:

Successes: ["matches", "serde", "semver", "url", "num_cpus", "libc", "thread_local", "num-traits", "thread-id", "strsim", "num", "env_logger", "lazy_static", "bitflags", "unicode-normalization"]

Failures:  ["time", "gcc", "log", "pkg-config", "byteorder", "aho-corasick", "kernel32-sys", "rustc-serialize", "winapi", "memchr", "rand", "regex", "regex-syntax", "winapi-build", "utf8-ranges"]


Some are obvious (winapi, etc) and most others fail because rand doesn't work (yet), but this should be a fun way to see how we're doing on crate coverage.

As an aside, writing this was a really fun exercise in combining futures, git2, hyper, rayon, serde, and tokio. I almost wrote it in python until Rob Tsuk convinced me that writing it in Rust would be more fun, and I'm impressed with how quickly it all came together. I'll try to clean it up and put it somewhere on fuchsia.googlesource.com soon.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia...@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia...@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

Taylor Cramer

unread,
Jul 27, 2017, 12:31:59 PM7/27/17
to Tim Kilbourn, rust-f...@fuchsia.com
Yeah-- hyper is kind of overkill for simple GET requests, but it is a really great building block.

On Thu, Jul 27, 2017 at 9:30 AM, 'Tim Kilbourn' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
No, I didn't. Hyper was a little crazy for doing a single GET so I'll check it out. It was a good excuse to try hyper though.
On Thu, Jul 27, 2017 at 9:29 AM 'Taylor Cramer' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
Nice work! One note-- did you look into using Reqwest instead of raw hyper? It's higher-level and easier to use, and probably supports everything you need.

On Wed, Jul 26, 2017 at 11:25 PM, 'Tim Kilbourn' via rust-fuchsia <rust-f...@fuchsia.com> wrote:
I wrote a little test program (in Rust of course) to download the top N crates by downloads and run 'fargo test' on them to see what works on Fuchsia and what doesn't. Here's the list for N=30:

Successes: ["matches", "serde", "semver", "url", "num_cpus", "libc", "thread_local", "num-traits", "thread-id", "strsim", "num", "env_logger", "lazy_static", "bitflags", "unicode-normalization"]

Failures:  ["time", "gcc", "log", "pkg-config", "byteorder", "aho-corasick", "kernel32-sys", "rustc-serialize", "winapi", "memchr", "rand", "regex", "regex-syntax", "winapi-build", "utf8-ranges"]


Some are obvious (winapi, etc) and most others fail because rand doesn't work (yet), but this should be a fun way to see how we're doing on crate coverage.

As an aside, writing this was a really fun exercise in combining futures, git2, hyper, rayon, serde, and tokio. I almost wrote it in python until Rob Tsuk convinced me that writing it in Rust would be more fun, and I'm impressed with how quickly it all came together. I'll try to clean it up and put it somewhere on fuchsia.googlesource.com soon.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia+unsubscribe@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia+unsubscribe@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

--
You received this message because you are subscribed to the Google Groups "rust-fuchsia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-fuchsia+unsubscribe@fuchsia.com.

To post to this group, send email to rust-f...@fuchsia.com.

Taylor Cramer

unread,
Jul 27, 2017, 12:33:49 PM7/27/17
to Tim Kilbourn, rust-f...@fuchsia.com
Note that if you want to keep using Tokio/Futures with Reqwest, you'll need to enable the "unstable" feature.

Tim Kilbourn

unread,
Jul 27, 2017, 3:50:46 PM7/27/17
to Taylor Cramer, rust-f...@fuchsia.com
PR for the rand crate: https://github.com/rust-lang-nursery/rand/pull/160

Is it possible to tell cargo to use my fork whenever another crate wants rand?

Alex Crichton

unread,
Jul 27, 2017, 5:16:33 PM7/27/17
to Tim Kilbourn, Taylor Cramer, rust-f...@fuchsia.com
> Is it possible to tell cargo to use my fork whenever another crate wants rand?

Certainly! If you're on the nightly channel you can use the `[patch]`
feature in Cargo [1] and if you're on stable you can use `[replace]`,
which is similar to `[patch]` but has a little different syntax.

[1]: http://doc.crates.io/specifying-dependencies.html#overriding-dependencies

On Thu, Jul 27, 2017 at 2:50 PM, 'Tim Kilbourn' via rust-fuchsia
>>>>>> an email to rust-fuchsia...@fuchsia.com.
>>>>>> To post to this group, send email to rust-f...@fuchsia.com.
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/a/fuchsia.com/d/msgid/rust-fuchsia/CAKUMrDsnZpwM7oFkOWAp0WCm4izFNZ5%2BHw7%3Dx2fwDgquR4DaTA%40mail.gmail.com.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "rust-fuchsia" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to rust-fuchsia...@fuchsia.com.
>>>>> To post to this group, send email to rust-f...@fuchsia.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/a/fuchsia.com/d/msgid/rust-fuchsia/CACZ-gpx%2B9zKj3WXpbsfHAOryPyHGesz23peFucWck7O3gxA2aQ%40mail.gmail.com.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "rust-fuchsia" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to rust-fuchsia...@fuchsia.com.
>>>> To post to this group, send email to rust-f...@fuchsia.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/a/fuchsia.com/d/msgid/rust-fuchsia/CAKUMrDvgLhEUrwekxmRTfYOhPrT6%2BPJ%2B1i5kS5hPyg7-5%3Dpg0g%40mail.gmail.com.
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "rust-fuchsia" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to rust-fuchsia...@fuchsia.com.
> --
> You received this message because you are subscribed to the Google Groups
> "rust-fuchsia" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rust-fuchsia...@fuchsia.com.
> To post to this group, send email to rust-f...@fuchsia.com.
> To view this discussion on the web visit
> https://groups.google.com/a/fuchsia.com/d/msgid/rust-fuchsia/CAKUMrDsvNqgRESo64AAZaqvAmv3mJ5QpUKaFE_G0uXJ2eCK5Yg%40mail.gmail.com.

Tim Kilbourn

unread,
Jul 27, 2017, 7:13:28 PM7/27/17
to Alex Crichton, Taylor Cramer, rust-f...@fuchsia.com
Thanks! I would have used this, except you already merged my patch so I don't have to. :)

Updated list after pushing rand and setting N=50:

Successes: ["matches", "typeable", "traitobject", "unicode-xid", "cfg-if", "strsim", "openssl-sys", "num_cpus", "thread_local", "bitflags", "serde", "openssl", "language-tags", "lazy_static", "httparse", "unicase", "thread-id", "libc", "mime", "url", "idna", "semver", "env_logger", "serde_json", "unicode-normalization", "num", "num-integer", "num-iter", "byteorder", "num-traits", "log", "rustc-serialize", "utf8-ranges", "memchr", "aho-corasick", "rand", "unicode-bidi", "toml", "hyper", "regex", "regex-syntax"]

Failures:  ["pkg-config", "rustc_version", "kernel32-sys", "time", "term", "gcc", "tempdir", "winapi-build", "winapi"]

time: it looks like we probably have a timezone issue, since we're returning dates that are 8 hours off from expected.
tempdir: looks like some issue around '..', which we handle weirdly anyway
term: we don't have terminfo


>>>>>> To post to this group, send email to rust-f...@fuchsia.com.
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/a/fuchsia.com/d/msgid/rust-fuchsia/CAKUMrDsnZpwM7oFkOWAp0WCm4izFNZ5%2BHw7%3Dx2fwDgquR4DaTA%40mail.gmail.com.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "rust-fuchsia" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send

>>>>> To post to this group, send email to rust-f...@fuchsia.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/a/fuchsia.com/d/msgid/rust-fuchsia/CACZ-gpx%2B9zKj3WXpbsfHAOryPyHGesz23peFucWck7O3gxA2aQ%40mail.gmail.com.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "rust-fuchsia" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send

>>>> To post to this group, send email to rust-f...@fuchsia.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/a/fuchsia.com/d/msgid/rust-fuchsia/CAKUMrDvgLhEUrwekxmRTfYOhPrT6%2BPJ%2B1i5kS5hPyg7-5%3Dpg0g%40mail.gmail.com.
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "rust-fuchsia" group.
>> To unsubscribe from this group and stop receiving emails from it, send an

>> To post to this group, send email to rust-f...@fuchsia.com.
>> To view this discussion on the web visit
>> https://groups.google.com/a/fuchsia.com/d/msgid/rust-fuchsia/CACZ-gpy70OdtQsQRbQ%3Dj36SycOX%3DEwGubHmStM2HEzm9OyHYRg%40mail.gmail.com.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "rust-fuchsia" group.
> To unsubscribe from this group and stop receiving emails from it, send an

> To post to this group, send email to rust-f...@fuchsia.com.
> To view this discussion on the web visit
Reply all
Reply to author
Forward
0 new messages