Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit resolving retired package versions, but prefer non-retired and emit warning #3854

Open
d2718 opened this issue Nov 19, 2024 · 1 comment
Labels
bug Something isn't working help wanted Contributions encouraged priority:high

Comments

@d2718
Copy link

d2718 commented Nov 19, 2024

To reproduce:

Add a retired package to your gleam.toml, for example:

gleam_pgo = "0.14.0"

And then try to build (or check) your package:

gleam check

Expected:

My package to build/check successfully.

Experienced:

Failure of dependency resolution.

gleam check
  Resolving versions
error: Dependency resolution failed

An error occurred while determining what dependency packages and
versions should be downloaded.
The error from the version resolver library was:

Unable to find compatible versions for the version constraints in your
gleam.toml. The conflicting packages are:

- py_package
- gleam_pgo

Environment:

Gleam 1.6.1 (installed from GitHub releases page)
Debian 12 under WSL2

spammy GLEAM_LOG=trace dump
dan@IPRC-PF4SK9MP:~/dev/aloy/server$ GLEAM_LOG=trace gleam check
DEBUG download_deps: locking_build_directory path="/home/dan/dev/aloy/server/build/packages"
TRACE download_deps: reading_file path="/home/dan/dev/aloy/server/gleam.toml"
DEBUG download_deps: manifest_not_present
  Resolving versions
TRACE download_deps: reading_file path="/home/dan/dev/aloy/walt/gleam.toml"
TRACE download_deps: reading_file path="/home/dan/dev/aloy/shared/gleam.toml"
 INFO download_deps: resolving_versions
DEBUG download_deps: looking_up_hex_package package="mist"
TRACE download_deps: checkout waiting for idle connection: ("https", repo.hex.pm)
DEBUG download_deps: starting new connection: https://repo.hex.pm/
TRACE download_deps: Http::connect; scheme=Some("https"), host=Some("repo.hex.pm"), port=None
DEBUG resolving host="repo.hex.pm"
DEBUG download_deps: connecting to 151.101.130.2:443
DEBUG download_deps: connected to 151.101.130.2:443
TRACE download_deps: http1 handshake complete, spawning background dispatcher task
TRACE download_deps: checkout dropped for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="gleam_stdlib"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="argus"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE download_deps: put; add idle connection for ("https", repo.hex.pm)
DEBUG download_deps: pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="gleam_erlang"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="stdin"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="envoy"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="wisp"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="gleam_http"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE download_deps: put; add idle connection for ("https", repo.hex.pm)
DEBUG download_deps: pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="gleeunit"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="simplifile"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="gleam_pgo"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="filepath"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE download_deps: put; add idle connection for ("https", repo.hex.pm)
DEBUG download_deps: pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="marceau"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE download_deps: put; add idle connection for ("https", repo.hex.pm)
DEBUG download_deps: pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="gleam_json"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE download_deps: put; add idle connection for ("https", repo.hex.pm)
DEBUG download_deps: pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="argv"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE download_deps: put; add idle connection for ("https", repo.hex.pm)
DEBUG download_deps: pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="birl"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="logging"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="glisten"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="gramps"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="hpack_erl"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="gleam_otp"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="jargon"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="telemetry"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="exception"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE download_deps: put; add idle connection for ("https", repo.hex.pm)
DEBUG download_deps: pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="gleam_crypto"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="directories"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
DEBUG download_deps: looking_up_hex_package package="ranger"
TRACE download_deps: take? ("https", repo.hex.pm): expiration = Some(90s)
DEBUG download_deps: reuse idle connection for ("https", repo.hex.pm)
TRACE put; add idle connection for ("https", repo.hex.pm)
DEBUG pooling idle connection for ("https", repo.hex.pm)
ERROR Failed error=DependencyResolutionFailed("Unable to find compatible versions for the version constraints in your\ngleam.toml. The conflicting packages are:\n\n- aloy\n- gleam_pgo\n")
error: Dependency resolution failed

An error occurred while determining what dependency packages and
versions should be downloaded.
The error from the version resolver library was:

Unable to find compatible versions for the version constraints in your
gleam.toml. The conflicting packages are:

  • aloy
  • gleam_pgo
@d2718 d2718 added the bug Something isn't working label Nov 19, 2024
@lpil lpil changed the title Dependency resolver ignoring retired packages entirely. Permit resolving retired package versions, but prefer non-retired and emit warning Nov 19, 2024
@lpil lpil added help wanted Contributions encouraged priority:high labels Nov 19, 2024
@lpil
Copy link
Member

lpil commented Nov 19, 2024

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Contributions encouraged priority:high
Projects
None yet
Development

No branches or pull requests

2 participants