You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With my team we are evaluating httpmock; it really looks like a great project.
Anyway, our test compile-time increased substantially due to its number of dependencies.
Would it maybe be possible to reduce the dependencies using cargo features? For example, I guess isahc and some other "client-side" libraries are used only with a remote server; could they be made optional and enabled with a remote feature?
Thanks for creating this issue! By looking at the dependency tree, I think it should be possible to reduce the number of dependencies that are required for regular usage (i.e., non-standalone mode) by about 30%. Most dependencies seem to be added by isahc and async-std (coming in though async-object-pool). I'll look into it.
Would it maybe be possible to reduce the dependencies using cargo features? For example, I guess isahc and some other "client-side" libraries are used only with a remote server; could they be made optional and enabled with a remote feature?
After skimming the code a little bit, I don't think ishac could be made optional in non-standalone mode since it is used to ping the test server. However, I think that a minimal client library such as ureq could be used for pinging instead.
Another approach is to replace every instance of isahc with ureq but the latter doesn't support async requests so I don't know if that is desirable.
Could isahc be potentially replaced by hyper's client capabilities, seeming as the code, at least in the ping case, is async? (see src/api/adapter/mod.rs#L84-L108)
Activity
alexliesenfeld commentedon Aug 12, 2021
Thanks for creating this issue! By looking at the dependency tree, I think it should be possible to reduce the number of dependencies that are required for regular usage (i.e., non-standalone mode) by about 30%. Most dependencies seem to be added by
isahcandasync-std(coming in thoughasync-object-pool). I'll look into it.ducaale commentedon Aug 13, 2021
Making isahc optional would also let users remove OpenSSL from their dependency tree since it doesn't play well with rust-cross.
ducaale commentedon Oct 11, 2021
After skimming the code a little bit, I don't think
ishaccould be made optional in non-standalone mode since it is used to ping the test server. However, I think that a minimal client library such as ureq could be used for pinging instead.Another approach is to replace every instance of
isahcwithureqbut the latter doesn't support async requests so I don't know if that is desirable.vikanezrimaya commentedon Feb 21, 2022
Could isahc be potentially replaced by hyper's client capabilities, seeming as the code, at least in the ping case, is async? (see src/api/adapter/mod.rs#L84-L108)
github-actions commentedon Apr 18, 2023
This issue is stale because it has been open for 30 days with no activity.
github-actions commentedon May 2, 2023
This issue was closed because it has been inactive for 14 days since being marked as stale.
feat: reduce dependency tree by ~30% for default and minimal builds (#46