-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
WIP: get rig of pub doc(hidden) #1736
Conversation
You are mixing so many things here. I like some parts, some parts I want to discuss. I especially dislike the view parts. Can you separate them into different kinds of PRs? |
The view parts are the core point, they serve as interpolation API. Everything else is build on top of them. Could you be more specific about want you like and what you don't? |
Basically, there are few things not related |
Most of those things are ought to be |
The |
f2ca888
to
bb0eab8
Compare
So, you think this huge amount of
Those are just the usages my eye picked upon a shallow glance, there are many more of those to go on apart from macros. If ou are really curious, quickly change My point is, you're underestimating how deeply these two crates are tangled together. It's not "just macros". |
I have given it a bit of thought. I understand that we need the |
Of course. As I stated, the work is a deep-in-progress. I've just copied the fields from |
Also, what do you think about #810 (comment)? |
I would much prefer this PR than doing that. The reason we want |
That issue would be than unsolvable due to circular dependency.
10.03.2020, 19:26, "Pavan Kumar Sunkara" <[email protected]>:
… I would much prefer this PR than doing that. The reason we want clap_generate separate is that we want to give tools to the end users to write their own generators for their own weird things.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
We should be able to solve that issue with macros. If they want those commands in their apps, they can use the macros. Or we can even provide a wrapper function in |
Note for anyone looking, this needs a rebase on master since the above linked PR was created out of parts of this. |
What about creating `AppBuilder` and `ArgBuilder` structs to do the builder
pattern properly? The only downside of this all the chaining of args and
apps need to end with `.build()`.
|
|
9278923
to
7da4883
Compare
fb159d4
to
6f62188
Compare
I'm positive that this was a spurious failure. My local test passes just fine and I haven't touched any code that could possible affect this. I'm flushing travis cache and restarting the build. |
@pksunkara Do you want me to squash the commits into one? |
Failure due to tarpalin is being unable to wait until ui tests have passed. I propose to exclude |
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.
Yes, please squash all the commits. Just have 2 minor comments. Once you fix them, I will merge this PR and you can create a new PR for the other doc(hidden)
things.
.args | ||
.args | ||
.iter() | ||
.filter(|a| a.short.is_none() && a.long.is_none()) |
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.
Should we add app.get_positionals()
? This exact logic is being repeated in macro positionals!
also. Would be nice to keep it DRY.
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.
get_positional
borrows the whole app
immutably, but we do app.settings.set()
several lines below (mutable borrow.
6f28dee
to
7cff206
Compare
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.
bors r+
1736: WIP: get rig of pub doc(hidden) r=pksunkara a=CreepySkeleton Co-authored-by: CreepySkeleton <[email protected]>
Build failed |
bors r+ |
Build succeeded |
That is my attempt of removing the
pub #[doc(hidden)]
blasphemy. It is not ready yet - far from being ready, in fact. I'm just publishing it to get some feedback from @TeXitoi and @pksunkara .