Skip to content

Implement v2-outdated command #9373

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

erikd
Copy link
Member

@erikd erikd commented Oct 26, 2023

Implement a v2-outdated command which is simply the v2 version of the outdated command.

It does all the v2 style setup in order to extract a PackageVersionConstraint list and then calls into the v1 version of the command for the logic and IO for the results.

Include the following checklist in your PR:

Bonus points for added automated tests!

Note: The diff on the file CmdOutput.hs is rather weird because this PR renames CmsOutdated.hs to Outdated.hs and then creates a new file CmdOutput.hs.

QA Notes

  • The v2-outdated command should work in an old project directory layout (a single top level <package>.cabal file) and a new project directory with just a cabal.project file.

@erikd erikd requested review from andreabedini and fendor October 26, 2023 00:17
@erikd erikd force-pushed the erikd/v2-outdated branch 7 times, most recently from c9ad027 to 4bd7f60 Compare October 26, 2023 00:45
toPackageVersionConstraint (Dependency name versionRange _) =
PackageVersionConstraint name (simplifyVersionRange versionRange)

genericPackageDependencies :: GenericPackageDescription -> [Dependency]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we can preserve the structure of the conditionals when presenting the results to the user. E.g. we can map CondTree ConfVar [Dependency] component into CondTree ConfVar [OurResultForDependency] Library` and use that to form the final report.

@erikd erikd marked this pull request as draft October 26, 2023 07:07
@erikd erikd force-pushed the erikd/v2-outdated branch 3 times, most recently from 342c092 to 6c083a9 Compare October 27, 2023 04:39
@erikd erikd force-pushed the erikd/v2-outdated branch from 6c083a9 to 48ccdf8 Compare November 14, 2023 02:25
@erikd erikd force-pushed the erikd/v2-outdated branch 6 times, most recently from cc3602f to 598c651 Compare November 27, 2023 04:32
@erikd erikd force-pushed the erikd/v2-outdated branch from a1ac243 to a41517e Compare January 9, 2025 06:06
The `Cmd*,hs` naming scheme is usually reserved for v2 commands and
this is a v1 command so renaming this to make way for a v2 version
of this command.

Since the `v2-outdated` command does everything the `v1` version of
the command does, this `Outdated.hs` module should probably be
removed.
@erikd erikd force-pushed the erikd/v2-outdated branch from a41517e to 1b7686e Compare March 26, 2025 02:41
@ulysses4ever
Copy link
Collaborator

This appears superseded by:

Should we close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants