Skip to content

Conversation

MartinNowak
Copy link
Member

  • automatically keeps tree in sync
  • avoids std_navbar-VERSION.ddoc files for every alpha/beta/rc release

@CyberShadow
Copy link
Member

  • tiny menu structure change, list heading is no longer a separate <li>

Ahhh, I think chmgen relies on that... I had to contort the macros in many ways until I got something that could emit half-decent HTML and something close to consistent JSON

@MartinNowak
Copy link
Member Author

Turns out that std_navbar-VERSION.ddoc idea is really ugly for release building, because we'd need I std_navbar-2.067.0-alpha1/beta1/rc2 and can't build dlang.org from a non-tagged branch because std_navbar-master.ddoc doesn't make sense.

So I wrote this tool to auto-generate the list of all modules.

@MartinNowak
Copy link
Member Author

Ahhh, I think chmgen relies on that... I had to contort the macros in many ways until I got something that could emit half-decent HTML and something close to consistent JSON

I didn't change chm-nav.dd and the macros have the same structure.
This is the change MartinNowak@261a1c8#diff-0a9f7332e397d43a017a2d56083def97L28 and the corresponding css change MartinNowak@261a1c8#diff-c7275721200b8eaa5f68458f83ce5d4eL102.

@CyberShadow
Copy link
Member

OK, if the generated .json files didn't change then it wouldn't affect it.

But even if they're not, JSON output should be easy to add to the new D program :)

@MartinNowak
Copy link
Member Author

Preview is here https://dlang.dawg.eu/ (with .htaccess redirects ;)).

@CyberShadow
Copy link
Member

Erm: https://dlang.dawg.eu/phobos/std_container_array.html

Funny, latest DDox has exactly the same bug.

@MartinNowak
Copy link
Member Author

Erm: https://dlang.dawg.eu/phobos/std_container_array.html

What's wrong with that?

@CyberShadow
Copy link
Member

"container" and "array" are both highlighted.

@MartinNowak
Copy link
Member Author

@MartinNowak
Copy link
Member Author

"container" and "array" are both highlighted.

Wait, will fix, dpl-docs uses that same (sane) list header ul structure.

@MartinNowak
Copy link
Member Author

Wait, will fix, dpl-docs uses that same (sane) list header ul structure.

So I can either only mark the leave as active (not it's parents) or you can come up with a nice css rule to select the most nested li.active.

@CyberShadow
Copy link
Member

So I can either only mark the leave as active (not it's parents)

Isn't that what the behavior is now?

@MartinNowak
Copy link
Member Author

Isn't that what the behavior is now?

Now it is :).

@CyberShadow
Copy link
Member

Well, now "std" isn't painted red when it's expanded...

@MartinNowak
Copy link
Member Author

Well, now "std" isn't painted red when it's expanded...

Any idea? I don't really want to add css rules for any possible li.active nesting level.

@CyberShadow
Copy link
Member

It's too late over here for nested CSS rules, but one thing that's gotta work is to just keep throwing more JavaScript at it ;)

@MartinNowak
Copy link
Member Author

Updated and fixed MartinNowak@fb1e638.

# exclude lists
MOD_EXCLUDES_PRERELEASE=--ex=gc. --ex=rt. --ex=core.internal. --ex=core.stdc.config --ex=core.sys. \
--ex=std.c. --ex=std.algorithm.internal --ex=std.internal. --ex=std.regex.internal. \
--ex=std.typelist --ex=std.windows. --ex=etc.linux.memoryerror
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use $(addprefix)?

@CyberShadow
Copy link
Member

LGTM, deferring to @andralex for review of approach and Makefile stuff

# (additionally to the phobos-prerelease directory)
# when 2.067 is released.

RewriteRule ^(phobos/std_container)_package\.html $1.html [R=301,L]
RewriteRule ^(phobos-prerelease/std_container)_package\.html $1.html [R=301,L]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @CyberShadow , I think he was looking into that too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine but I'd put it on one line (^(phobos(-prerelease)?/std_...).

@MartinNowak MartinNowak force-pushed the stdnav branch 2 times, most recently from 71393a1 to 18067a4 Compare February 17, 2015 17:48
std.c. std.algorithm.internal std.internal. std.regex.internal. std.typelist \
std.windows. etc.linux.memoryerror)

MOD_EXCLUDES_RELEASE=$(MOD_EXCLUDES_PRERELEASE) --ex=core.stdc.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was some grumbling on iRC today about us not even having a list of available C functions (even with placeholder documentation). It might be worth it to list them if only because you can use a web search to find which module a function is in.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Nice. Ideally we'd also link to cppreference OSLT.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't find the opengroup link particularly useful either, but for some reason it was chosen.

@MartinNowak
Copy link
Member Author

OK, one part left #914. Then I don't know how to shrink this pull even further.

In the meantime I'm trying to find out how to correctly build docs on Windows, because Nick's old recipe no longer works.
https://github.com/D-Programming-Language/installer/blob/cfacf6e337c3a03ddba73740d96c5b33b3a5ae21/create_dmd_release/create_dmd_release.d#L783

@CyberShadow
Copy link
Member

Looks fine at a glance, how is it broken?

@CyberShadow
Copy link
Member

I think I see it, there's no DOCSRC in Druntime, it should be DOCFMT=..\dlang.org\std.ddoc OSLT.

@CyberShadow
Copy link
Member

That would also explain the fickle Druntime style bugs - since both win32.mak files build the Druntime docs (talk about redundancy), the first one builds broken ones and the second sees that they're already built, and doesn't rebuild them.

- automatically keeps tree in sync
- avoids std_navbar-VERSION.ddoc files for every alpha/beta/rc release
- shared exclude patterns for modlist and dpl-docs
- tiny menu structure change, list heading is no longer a separate <li>
  this is simpler and semantically more correct

  `<li><h7>package</h7></li><li><ul><li>mod1</li></ul></li>` =>
  `<li><h7>package</h7><ul><li>mod1</li></ul></li>`

- adapt highlighting of menu entries accordingly
- optimize querying the currently selected li
  using an attribute selector
@CyberShadow
Copy link
Member

I'll merge this since this was open for a while and there were no objections.

CyberShadow added a commit that referenced this pull request Feb 18, 2015
@CyberShadow CyberShadow merged commit 7daac40 into dlang:master Feb 18, 2015
@MartinNowak MartinNowak deleted the stdnav branch February 18, 2015 20:43
CyberShadow added a commit that referenced this pull request Feb 28, 2015
@CyberShadow
Copy link
Member

Any idea what's up with this?

rdmd --compiler=../dmd/src/dmd -m64 -I../druntime/import -I../phobos -L-L../phobos/generated/linux/release/64 modlist.d ../druntime ../phobos --ex=gc. --ex=rt. --ex=core.internal. --ex=core.stdc.config --ex=core.sys. --ex=std.c. --ex=std.algorithm.internal --ex=std.internal. --ex=std.regex.internal. --ex=std.typelist --ex=std.windows. --ex=etc.linux.memoryerror >.generated/modlist-prerelease.ddoc
/tmp/.rdmd-1056/rdmd-modlist.d-1F3D6412A81AEBD909006B159F5F0E51/objs/modlist.o: In function `_D3std9algorithm9iteration68__T6filterS547modlist4mainFAAyaZ3addMFAyaKS7modlist4TreeZ9__lambda3Z175__T6filterTS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ6filterMFS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZS3std9algorithm9iteration239__T12FilterResultS547modlist4mainFAAyaZ3addMFAyaKS7modlist4TreeZ9__lambda3TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ12FilterResult':
modlist.d:(.text._D3std9algorithm9iteration68__T6filterS547modlist4mainFAAyaZ3addMFAyaKS7modlist4TreeZ9__lambda3Z175__T6filterTS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ6filterMFS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZS3std9algorithm9iteration239__T12FilterResultS547modlist4mainFAAyaZ3addMFAyaKS7modlist4TreeZ9__lambda3TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ12FilterResult+0x4f): undefined reference to `_D3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResult15__fieldPostblitMFZv'
/tmp/.rdmd-1056/rdmd-modlist.d-1F3D6412A81AEBD909006B159F5F0E51/objs/modlist.o: In function `_D3std9algorithm9iteration239__T12FilterResultS547modlist4mainFAAyaZ3addMFAyaKS7modlist4TreeZ9__lambda3TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ12FilterResult6__ctorMFNcS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZS3std9algorithm9iteration239__T12FilterResultS547modlist4mainFAAyaZ3addMFAyaKS7modlist4TreeZ9__lambda3TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ12FilterResult':
modlist.d:(.text._D3std9algorithm9iteration239__T12FilterResultS547modlist4mainFAAyaZ3addMFAyaKS7modlist4TreeZ9__lambda3TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ12FilterResult6__ctorMFNcS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZS3std9algorithm9iteration239__T12FilterResultS547modlist4mainFAAyaZ3addMFAyaKS7modlist4TreeZ9__lambda3TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ12FilterResult+0x25): undefined reference to `_D3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResult15__fieldPostblitMFZv'
/tmp/.rdmd-1056/rdmd-modlist.d-1F3D6412A81AEBD909006B159F5F0E51/objs/modlist.o: In function `_D3std9algorithm9iteration239__T12FilterResultS547modlist4mainFAAyaZ3addMFAyaKS7modlist4TreeZ9__lambda3TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ12FilterResult15__fieldPostblitMFZv':
modlist.d:(.text._D3std9algorithm9iteration239__T12FilterResultS547modlist4mainFAAyaZ3addMFAyaKS7modlist4TreeZ9__lambda3TS3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResultZ12FilterResult15__fieldPostblitMFZv+0xd): undefined reference to `_D3std9algorithm9iteration121__T12FilterResultS76_D3std4file10dirEntriesFAyaAyaE3std4file8SpanModebZ1fMFS3std4file8DirEntryZbTS3std4file11DirIteratorZ12FilterResult15__fieldPostblitMFZv'
/tmp/.rdmd-1056/rdmd-modlist.d-1F3D6412A81AEBD909006B159F5F0E51/objs/modlist.o:(.data._D152TypeInfo_S3std3uni38__T13InversionListTS3std3uni8GcPolicyZ13InversionList67__T9IntervalsTS3std3uni32__T8CowArrayTS3std3uni8GcPolicyZ8CowArrayZ9Intervals6__initZ+0x60): undefined reference to `_D3std3uni38__T13InversionListTS3std3uni8GcPolicyZ13InversionList67__T9IntervalsTS3std3uni32__T8CowArrayTS3std3uni8GcPolicyZ8CowArrayZ9Intervals15__fieldPostblitMFNaNbNiNeZv'
collect2: error: ld returned 1 exit status
make: *** [.generated/modlist-prerelease.ddoc] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants