dub
dub copied to clipboard
`dub select`, `dub deselect`, `dub upgrade -l`
first part to interact with dub.selections.json
dub explain comes in a separate PR. (for issues see #1064)
fix #123
I'm not sure that select is right name, as it sounds like an action.
Examples from other package managers:
cargo tree: https://doc.rust-lang.org/stable/cargo/commands/cargo-tree.htmlyarn why: https://yarnpkg.com/cli/whyyarn set resolution: https://yarnpkg.com/cli/set/resolution (withdub selectI would expect to change which versions are selected / resolved - e.g. to updatedub.selections.jsonnpm explain: https://docs.npmjs.com/cli/v7/commands/npm-explainpipenv graphhttps://pipenv.pypa.io/en/latest/cli/#pipenv-graph (I'm not sure about this one)
yes dub select <pkg> <version> can be used to select packages in dub.selections.json
I'm thinking that doing dub select without any arguments should also perform some useful action, so I was thinking showing the full dependency graph would be a good addition.
I guess dub describe already exists so it could be a sub-whatever of that
maybe it's better to separate dub select and dub explain into two PRs.
EDIT: done, this PR is now only dub select
maybe it's better to separate
dub selectanddub explaininto two PRs.
"Everything should be made as simple as possible, but no simpler" - (Not) Einstein
Suggestion: dub explain => dub why to better reflect my state of mind every time I need this command (/s).
I moved the dub explain part out of here into a separate branch for now, as the select interface is quite a lot easier to add, show and test.
dub upgrade -l now shows this kind of output and does an implicit dry run: (can be made a non-dry run)

dub select pkg ver can be used to insert or change a dependency in dub.selections.json
dub deselect pkg can be used to remove a dependency from dub.selections.json
test failure seems unrelated? (dmd-master only)
need an approve to merge @Geod24
I'm a bit confused, I thought this was only for optional dependencies, originally, but there's no mention of it ?