mozilla / sccache

Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various cloud storage options, or alternatively, in local storage.
Apache License 2.0
5.85k stars 552 forks source link

Cannot use unix socket URI without authority for redis cache #2214

Open RuairidhWilliamson opened 4 months ago

RuairidhWilliamson commented 4 months ago

The documentation https://github.com/mozilla/sccache/blob/main/docs/Redis.md states you can use a unix socket endpoint of unix:///tmp/redis.sock. However this gives the error endpoint is invalid, source: invalid format.

This is because the URI is parsed by http::Uri which has a known limitation that it does not parse URIs without authorities. https://github.com/hyperium/http/issues/323

As a work around you can put any authority e.g. unix://banana/tmp/redis.sock. This will parse correctly and the authority is ignored by sccache anyway.