-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Partial revert of 4d2c4af 'Improve template mechanism' #439
Conversation
There were template functions which we defined and others started using. Although we no longer want those functions, since others use them, deleting them breaks our API. Putting those (unused) functions back.
LGTM, also thanks for the FIXME notes. |
I'm going to self merge to unblock kubernetes. @BoGeM we can talk about next steps if you disagree with what I'm doing here... |
We only should return Gt and Eq functions, if we want to return backward compatibility. |
ok, will fix, but @fabianofranz you are free!! |
Private funcs are also important since they can be used by people providing their templates through |
If they provide custom templates, they can provide their own functions by AddTemplateFunc. |
But we don't break existing users, if someone could be using those functions via |
Mind you I'm all for going to something we call v2. The inconsistency in handling of finding subcmds vs taking unnamed arguments has always bothered me a lot :) |
If they want to use them, they can copy these functions and them by themselves. It's no problem. |
agreed, technically it is easy, fabiano would have created his own functions. But the contract we make with users is not to break their software unless we move to v2. If it worked yesterday, it must work tomorrow. Even if that means we are stuck with something subpar, as long as 1 person relied on it, we must keep it until we change the major version. (given we don't even have a 1.0 I know that 'major version' thing is hard to visualize) |
So what about a writing a roadmap to release v1.0? |
And we should consider #259 issue. |
Personally I think cobra works well enough that we could just call it 1.0 right now and start working on removing all the silly things like this PR... |
Then let's write a list of silly things, what we should remove. |
I can think of 2 :) What's a good place? in #259? |
I think, we should make new issue for it. |
There were template functions which we defined and others started using.
Although we no longer want those functions, since others use them,
deleting them breaks our API. Putting those (unused) functions back.
Fixes the report in #422 (comment)