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

Notify of new major versions available when running gleam update #3843

Closed
lpil opened this issue Nov 17, 2024 Discussed in #3841 · 5 comments
Closed

Notify of new major versions available when running gleam update #3843

lpil opened this issue Nov 17, 2024 Discussed in #3841 · 5 comments
Labels
good first issue Good for newcomers help wanted Contributions encouraged priority:medium

Comments

@lpil
Copy link
Member

lpil commented Nov 17, 2024

Discussed in #3841

Originally posted by hayleigh-dot-dev November 17, 2024
As the ecosystem grows it is becoming more difficult to keep track of when packages are updated with new breaking changes. Short of just making a list of every dependency of every package I maintain and regularly checking for new versions, there is no real way to know if any of my dependencies have updated until a user opens an issue or I notice by happenstance.

One thing I can do reliably is run gleam update in my packages from time to time. I'd like to propose that command also reports when any major version bumps are available, something like:

 % gleam deps update
  Resolving versions
Downloading packages
 Downloaded 2 packages in 0.01s
 
Hint: the following dependencies have new major versions available...

- wibble@2
- wobble@3

I think this would have a general benefit to the community:

  • package consumers get notified when things have moved on and can make an informed decision to upgrade or not.
  • package authors have an easier time broadcasting new changes, which is particularly impactful for "foundation" packages like mist or lustre where the community at large benefits from being on the same version.
  • package authors can more-easily make sure they're not fragmenting the community by sticking on old versions of dependencies unnecessarily.
@lpil lpil added help wanted Contributions encouraged good first issue Good for newcomers priority:medium labels Nov 17, 2024
@lpil
Copy link
Member Author

lpil commented Nov 17, 2024

Let's do it. I think Mix and Cargo have a nice way of displaying this

@andho
Copy link

andho commented Nov 22, 2024

I'm giving this a try.

@andho
Copy link

andho commented Nov 22, 2024

It would be better if the output indicates the current (exact) version as well:

 % gleam deps update
  Resolving versions
  Downloading packages
  Downloaded 2 packages in 0.01s
 
Hint: the following dependencies have new major versions available...

wibble    @1.8.3  ->  @2.2.0
wobbling  @1.3.2  ->  @3.0.0

@andho
Copy link

andho commented Nov 22, 2024

I have a very rough implementation at #3876. I'm currently making a separate request for each hex package to get the latest version. I'm considering the following alternative, but not sure if it's viable:

Use dependency::resolve_versions function but set the dependencies to have * as the requirement. It might not resolve to the latest possible version because of inter-dependencies. It doesn't feel like what we want. But otherwise, I can see the only way is to query for each package separately.

It seems hexpm doesn't have an API for this. But mix deps.outdated exists. Actually mix deps.outdated looks very helpful.

@lpil
Copy link
Member Author

lpil commented Nov 22, 2024

Yup it needs to show the latest versions.

Closing as duplicate of #2583, thanks all

@lpil lpil closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Contributions encouraged priority:medium
Projects
None yet
Development

No branches or pull requests

2 participants