-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
dub select
, dub deselect
, dub upgrade -l
#2359
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
maybe it's better to separate EDIT: done, this PR is now only |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
e3915d3
to
9e6e9c6
Compare
dub select
+ dub explain
dub select
, dub deselect
, dub upgrade -l
I moved the
|
Provides easier interfaces for dub.selections.json
d3e1e69
to
d339144
Compare
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 ? |
combined with `--missing-only` (now available as `-m` as well) to show what is | ||
being done internally when running `dub build`. Both an upgrade as well as | ||
listing can be done by running `dub upgrade --list --dry-run=false` or | ||
`dub upgrade -l -dfalse`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure -dfalse
works ? That would be odd - and not something we should recommend. Or perhaps you mean -d false
?
packages + packages to upgrade in an easy-to-read interface. This can be | ||
combined with `--missing-only` (now available as `-m` as well) to show what is | ||
being done internally when running `dub build`. Both an upgrade as well as | ||
listing can be done by running `dub upgrade --list --dry-run=false` or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit bothered by the fact we now have more switches to do the same thing, slightly differently.
We have dub -v
and dub upgrade -l
and -l
implies dry run but we can also use -d false
...
How about simplifying it and always having dub upgrade -l
behavior, and just keeping dry-run for dub upgrade -l
?
Note that dub upgrade -l
is not IMO very consistent CLI behavior: options (things starting with dash) shouldn't be used to implement subcommands, they should only slightly modify command behavior. So if you want to keep the dub upgrade -l
behavior I would have gone with dub upgrade list
. I'm not attached to the specifics, so happy to hash this out.
"If one or more package names are specified, only those dependencies will be upgraded. Otherwise all direct and indirect dependencies of the root package will get upgraded." | ||
"If one or more package names are specified, only those dependencies will be upgraded. Otherwise all direct and indirect dependencies of the root package will get upgraded.", | ||
"", | ||
"List output format: (not script-safe)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't write "(not script-safe)". Except for dub describe
, nothing is script safe.
/** Returns a modified dependency that's relative to a given path, if the | ||
path was absolute. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we already have a function to do this no ?
/// Selects a certain version for a specific package. | ||
void selectVersion(string package_id, Version version_) | ||
/// Selects the exact dependency for a specific package. | ||
void selectVersion(string package_id, Dependency d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to remove any use of Dependency
from the API because it's almost always wrong. Why re-introduce it?
@WebFreak001 : Do you want to pursue this ? It would be a useful addition. |
I think this would need a rewrite since the underlying architecture changed quite a lot, which I'm currently not able to work on. I'd leave this open for anyone who wants to tackle it though |
first part to interact with dub.selections.json
dub explain
comes in a separate PR. (for issues see #1064)fix #123