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

Support :warn_if_outdated in deps #1058

Merged
merged 11 commits into from
Jan 21, 2025
Merged

Support :warn_if_outdated in deps #1058

merged 11 commits into from
Jan 21, 2025

Conversation

wojtekmach
Copy link
Member

@wojtekmach wojtekmach commented Jan 13, 2025

Example:

image

Example:

    $ mix deps.get
    Resolving Hex dependencies...
    Resolution completed in 0.0s
    Unchanged:
      ecto 3.3.1
      ecto_sql 3.3.2
      ex_doc 0.1.0
      postgrex 0.2.1
    warning: the following deps set `warn_if_outdated: true` and are outdated:

     * ecto 3.3.2 is available
     * ecto_sql 3.3.3 is available
if deps_to_warn != [] do
IO.warn(
[
"the following deps set `warn_if_outdated: true` and are outdated:\n\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use backticks on Elixir but maybe we do on Hex. Please double check. :)

Copy link
Member

@josevalim josevalim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful, although @ericmj should likely double check before merging!

@wojtekmach
Copy link
Member Author

In terms of UX, and this may be a bit tricky finding exact line, but for completeness something like this should be possible most of the time too:

image


latest_version =
versions
|> Enum.filter(&Version.match?(&1, requirement))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets filter pre-releases also

wojtekmach and others added 4 commits January 21, 2025 10:54
Co-authored-by: José Valim <jose.valim@dashbit.co>
@wojtekmach wojtekmach merged commit f963a8f into main Jan 21, 2025
26 checks passed
@wojtekmach wojtekmach deleted the wm-warn-if-outdated branch January 21, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants