gleam-lang / gleam

⭐️ A friendly language for building type-safe, scalable systems!
https://gleam.run
Apache License 2.0
17.62k stars 736 forks source link

"too many redirects" HTTP error without a manifest.toml file #2859

Closed frazjp65 closed 6 months ago

frazjp65 commented 6 months ago

Gleam version: 1.0.0 (installed through asdf)

OS: Ubuntu 20.04 (WIndows 10 WSL)

Issue: When I run "gleam test" and some other commands when there is no manifest.toml file I get "too many redirects" HTTP error for varying hex URLs. If I am in a project that has the manifest.toml file, there does not seem to be a problem.

Steps to recreate:

gleam new bdemo
cd bdemo
gleam test

image

Running "curl -sq --max-redirs 0 https://hex.pm/api/packages/gleam_stdlib/releases/0.36.0" is successful.

lpil commented 6 months ago

This is us trying to talk to the Hex package manager APIs to get the versions of your deps.

Could you run with the GLEAM_LOG environment variable set to trace please

frazjp65 commented 6 months ago

I attached the log.

gleam.log

frazjp65 commented 6 months ago

I'll let you decide whether or not to close this. I confirmed that this is not a problem when I compile the current version or the v1.0.0 tag. I am going to look and see if it is something with how asdf installs it. Edit: I uninstalled version 1 from asdf and installed using ref:main. Everything works like this.

frazjp65 commented 6 months ago

I checked the code for asdf-gleam. It just downloads this version for me: https://github.com/gleam-lang/gleam/releases/download/v1.0.0/gleam-v1.0.0-x86_64-unknown-linux-musl.tar.gz

I downloaded that and ran it. The issue came back with that version.

lpil commented 6 months ago

Brilliant, thank you very much!