-
Notifications
You must be signed in to change notification settings - Fork 709
Extend cabal outdated
to multi-package
#8283
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
Comments
From
so this is definitely not working now. |
Copying here some comments from @hvr:
|
Isn't this functionality already available somewhere else for all of the new commands to use? |
If you just want all the local packages you can take inspiration from here cabal/cabal-install/src/Distribution/Client/CmdFreeze.hs Lines 126 to 139 in 9f37325
If you want to accept a target like Herbert is saying you need to do something like this Note that |
This commit updates the outdated command to the new v2 architecture: - Transform the old `outdated` command into a new v2-style command `v2-outdated` - Support three modes of operation: - Check for outdated dependencies in v1-style freeze file - Check for outdated dependencies in project context (cabal.project & cabal.project.freeze) - Check for outdated dependencies in local packages Since the `cabal outdated` command now supports the v2-architecture, you can request to run the `v2-outdated` command on any target. I also introduced the `resolveTargetsFromLocalPackages` which resolves which local packages targets refer to without having to run the solver. This will be useful for `cabal check` as well. A change in behaviour from before is that the package description is flattened, so all bounds will be warned about rather than those in conditional branches being ignored. Fixes #8283
This commit updates the outdated command to the new v2 architecture: - Transform the old `outdated` command into a new v2-style command `v2-outdated` - Support three modes of operation: - Check for outdated dependencies in v1-style freeze file - Check for outdated dependencies in project context (cabal.project & cabal.project.freeze) - Check for outdated dependencies in local packages Since the `cabal outdated` command now supports the v2-architecture, you can request to run the `v2-outdated` command on any target. I also introduced the `resolveTargetsFromLocalPackages` which resolves which local packages targets refer to without having to run the solver. This will be useful for `cabal check` as well. A change in behaviour from before is that the package description is flattened, so all bounds will be warned about rather than those in conditional branches being ignored. Fixes #8283
I have implemented v2-outdated on this branch - https://github.com/haskell/cabal/tree/wip/v2-outdated If anyone wishes to try it out that would be good. I will tidy up the tests tomorrow.
This also fixes a bug where dependencies in conditional branches were not taken into account. It didn't seem worth it to to keep the old |
I agree with this in principle, but I'd like to point out that last time a move like that prompted a somewhat intense debate: #9107 |
Is |
It could also be extended to check bounds for non-local packages, but this seemed like overkill. Where is it different.
If you could try out the patch it would be greatly appreciated @andreasabel. Perhaps I could also quickly add support for build-tool-depends as well if you could guide this collaboration. |
I am happy to try if you put up a (draft) PR. |
This commit updates the outdated command to the new v2 architecture: - Transform the old `outdated` command into a new v2-style command `v2-outdated` - Support three modes of operation: - Check for outdated dependencies in v1-style freeze file - Check for outdated dependencies in project context (cabal.project & cabal.project.freeze) - Check for outdated dependencies in local packages Since the `cabal outdated` command now supports the v2-architecture, you can request to run the `v2-outdated` command on any target. I also introduced the `resolveTargetsFromLocalPackages` which resolves which local packages targets refer to without having to run the solver. This will be useful for `cabal check` as well. A change in behaviour from before is that the package description is flattened, so all bounds will be warned about rather than those in conditional branches being ignored. Fixes #8283
Thanks @andreasabel, see #10878 |
E.g. in the root of this repo:
It would be helpful if
cabal outdated
could also deal with acabal.project
file (instead of.cabal
files only), similar tocabal build
etc. It could list the outdated dependencies for all packages mentioned incabal.project
(grouped per package).The text was updated successfully, but these errors were encountered: