-
-
Notifications
You must be signed in to change notification settings - Fork 668
Fix Issue 10665 - The documentation produced by ddoc should clearly list all public imports of a module #9068
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
|
Thanks for your pull request and interest in making D better, @JinShil! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#9068" |
|
It still needs a test, but I'd like some feedback first if this is what we want. I had a previous version that recursively added members from public imports, but I'm not sure if that's what we want. |
|
I like it. Couple of questions: What does no comment look like? |
Correct. If the import is private, nothing is emitted.
In the example above, if |
|
This isn't ready yet. |
|
We definitely want it. Public imports are part of a module's interface, and should be documented as such. |
|
If it weren't for DAutoTest, I'd say this is good to go, however it seems to segfault while building the docs for dmd: |
|
This is not ready yet. Please wait until I add a final comment stating that this is ready. |
|
@kinke LDC doesn't compile this function; see the Semaphore CI output. override void visit(Import i)
{
HdrGenState hgs;
hgs.ddoc = true;
emitProtection(buf, i);
.toCBuffer(s, buf, &hgs); // dmd/doc.d(1270): Error: function dmd.doc.toDocBuffer.ToDocBuffer.visit cannot access frame of function dmd.doc.toDocBuffer
}Please help. Thanks! |
|
From a quick glance, your new override is the only one capturing something ( |
|
Is this good to go? |
|
No, it's not ready yet. I'm sorry. I have one more issue to solve, and while the symptom is simple, the solution appears to be quite difficult. I'll keep picking away at it. |
…ist all public imports of a module
|
I think this is finally ready to go. The following code... /// This is a public import
public import core.stdc.string;
/// This is a mutiple public import
public import core.stdc.stdarg, core.stdc.stdlib;
/// This is a public selective import
public import core.stdc.string : memcpy;
/// This is a public selective renamed import
public import core.stdc.string : copy = memcpy;
/// This is a public multiple selective import
public import core.stdc.string : memcpy, memcmp;
/// This is a public multiple selective renamed import
public import core.stdc.string : copy = memcpy, compare = memcmp;
/// This is a public renamed import
public import str = core.stdc.string;... will produce the following output: |

Uh oh!
There was an error while loading. Please reload this page.