purescript / spago

🍝 PureScript package manager and build tool
BSD 3-Clause "New" or "Revised" License
776 stars 131 forks source link

Doesn't work behind proxy #1233

Open alaendle opened 2 months ago

alaendle commented 2 months ago

Mainly because of using affjax for the requests (https://github.com/purescript-contrib/purescript-affjax/issues/131):

https://github.com/purescript/spago/blob/f0f79015f419aa015bfb4433968a5cbab9308e94/src/Spago/Command/Fetch.purs#L225-L230

Resulting in pretty generic error message like: grafik

f-f commented 2 months ago

How would proxy support work? Like, should Spago be picking up the usual environment variables? In that case I guess we should use http-proxy to pick up these vars? (and switch from affjax to fetch I guess?

alaendle commented 2 months ago

@f-f Sounds good to me. I really had hoped that some library supports this out-of-the box - without any ceremonies. The interesting observation is that spago already comes so far since the package set is fetched via git - which respects the proxy environment variables 😄 Unfortunately, I will not be able to contribute via PR - as I only noticed this in passing, but I still wanted to record this issue as a reference - since it is not immediately obvious by just looking at the error message.