-
Notifications
You must be signed in to change notification settings - Fork 284
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
Simplify @path handling #999
Conversation
Geod24
commented
Mar 7, 2015
- Make @rootPathAttribute the default: it just scales better, there is rarely a point in having multiples interfaces at the root.
- Kill RootPathAttribute and use PathAttribute only instead: There was no real difference between @rootpath and @path, as they were mutually exclusive (path on method, rootPath on interface) and had the same behavior (e.g. they are always relative). This will obviously make user code less error-prone.
- Communicate the settings to the sub-interface.
You mean Deprecation of
It's just to be consistent with all other |
Yes, I meant As per why I want it to be the default : Again, another possibility is to deprecate un-annotated interface for X releases / X time.
Ok, makes sense. |
5b17090
to
0310b31
Compare
Rebased. |
You are right that collection/object handling still needs to be improved. I had some ideas for that, but have to think about this again to remember the details. But please let's leave this as a separate concern for now, because deprecating One thing regarding |
0310b31
to
9fd5283
Compare
I'd be interested to know, when you have time to write them down (unrelated: did you get my email?). For the deprecation, I agree, I just didn't like the double-deprecation (we ask to use rootPathAttribute, then we remove it). Is this new version better ? |
9fd5283
to
cbdb129
Compare
I'm not sure I understand your point. The point of This policy is similar to what Druntime/Phobos use to do. But now they're going straight to deprecated because you can give a message with |
What I meant was that I'd like to exclude the
A typical situation is that you have a project with dependencies to several libraries. Now it may easily be the case that library A only works with vibe.d 0.7.22, but library B requires 0.7.23. If we now immediately deprecate something in 0.7.23, there is no way to get a clean build with up-to-date dependencies. Including an additional "soft deprecation" step at least alleviates this issue. |
0352b61
to
27eff74
Compare
Updated. |
release (0.7.25), and later turned into an error (0.7.26) to allow | ||
users to catch any unattributed interface and annotate them with | ||
@path("/"). Later on (0.7.27), the unattributed interfaces will be | ||
legal again, with a default path generated from their name. |
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.
This paragraph should get removed for this PR.
Ultimately, we want to make @rootPathAttribute the default for interface (it's already the default behavior for methods), and remove the @rootpath attribute, because it's redundant with @path, and they currently don't overlap, @rootpath being dedicated to interfaces, and @path to method. This commit: - Document future deprecation of @rootpath and redefine @rootpath and @rootPathFromName in terms of @path; - Documents @path better; - Communicate the settings to the sub-interface;
27eff74
to
7508df2
Compare
Update. |
Thanks, LGTM! |
- Doc improvements - Some fixes for examples - Convert examples to unit tests