-
-
Notifications
You must be signed in to change notification settings - Fork 237
Clean up API and documentation for the 1.0.0 release #785
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
Conversation
Okay, the API should be good to go for 1.0.0 now (apart from a change in |
c34efc4
to
0ed4ce5
Compare
Rebase finished. Review status page: https://github.com/D-Programming-Language/dub/wiki/API-review-for-1.0.0 |
f1ee978
to
f6a6a3a
Compare
There's something to be said for Walter's policy of breaking up PR's by commits :/ |
source/dub/internal/utils.d
Outdated
|
||
string stripDlangSpecialChars(string s) | ||
{ | ||
import std.array; |
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.
import std.array : appender;
What difference would that make in this case, though, apart from greatly increasing the overhead for PR creation/merging? I've tried to make one commit for each step, so that reviewing commit-by-commit reduces the pain a bit. |
/// project package. | ||
void loadPackageFromCwd() | ||
deprecated("Use loadPackage instead.") | ||
alias loadPackageFromCwd = loadPackage; |
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.
maybe add a removal date?
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.
My plan is to remove all deprecated symbols for the 1.0.0 release, so that we can start with a clean slate. So instead of a date, I'd mention the version, but I'll add that for all deprecations throughout the API.
I found a bit of time and had a look over this. Maybe you want to set a removal date for the deprecation and annotate them so it's easier to find? |
The .format member was never used.
Okay, deprecations are augmented with removal notes now and everything is rebased onto master. |
Hi Sönke, Here's my review: General suggestions:
Commit-by-commit review:
Overall this PR LGTM. |
@JackStouffer I personally found it easy to do a commit-by-commit review. Most commits add documentation, move stuff around, or change names / add deprecations. But you still need look at each module as a whole to get a sense of the bigger picture. |
@ZombineDev: Thanks a lot for the detailed review! I agree with almost all of the points, but I think that the time frame isn't sufficient to implement most of them. The goal is to get DUB to 1.0.0 ASAP and just avoid the most prominent kinks in the public API. That's why I restrained my changes to the most obvious and least intrusive ones for now. But 2.0.0 should definitely aim for a thorough design revision - the codebase is dated, D and Phobos changed a lot over the years, and the first months of development were rather rushed, to get something that works fast (as a package manager only for vibe.d and not intended as a general purpose tool). When this PR is merged, I'll put your remaining points into an issue or on the wiki so that they can eventually get processed after the 1.0.0 release (can happen additively, flagging the old APIs as "scheduled for deprecation"). As the first step, I'll go through the specific points for each commit (might take some time, but hopefully I can allocate a good chunk of time tomorrow). BTW, regarding deprecations, I don't think that pre- or post-1.0.0 really makes a practical difference. Some projects already use DUB as a library and not having a grace period for breaking changes is always a pain point (requiring |
Adds getAllDependencies() as a semantically sound replacement.
Replaced the constructor by a static
Replaced
You mean the
Definitely on the radar.
They are useful when DUB is used as a library. I'm for example using it for a CI slave, so that it can report the actual platform for a particular set of compiler switches.
Should definitely be done. I'll get to this later, since it's not part of the API.
Done.
Good point. I think this needs to be postponed to after 1.0.0, though.
Done.
Do you mean globally in the module? They are now next to each other within their struct context. Naming convention still needs to be fixed, but they are not public.
At least the
Do you have something specific in mind? Maybe the behavior of the "fuzzy" version match could be explained there, or a link to the relevant section in the package format specification could be added.
The SDLang serialization code is in
What do you mean here specifically?
The only reason
There is
Done. |
Hm that test failure for 2d8f991 is a mystery... edit: Looks like Travis-CI just picked up a newer commit when building... I was always under the impression that they'd do a |
Breaks the import cycle between dub.compilers.compiler and dub.compilers.ldc/gdc/dmd.
Cyclic compiler imports and |
Merges the code from compiler.defaultCompiler into the Dub class. Improves documentation comment for Dub.defaultCompiler.
Okay, since the remaining points are of general nature and not specific to the change set here, I'll merge this as soon as Travis is green to unblock further development, and will create an issue for the rest. |
This mostly just adds documentation comments. Some code got deprecated/removed and some code got moved. Review should be pretty straight forward, despite the size of the diff.