Skip to content

Conversation

@wilzbach
Copy link
Contributor

This is WIP and at least gets dpl-docs compiling with ddox 0.16.
I opened this PR to (ab)use DAutoTest a bit - sorry for the noise.

@dlang-bot dlang-bot added the WIP label Sep 10, 2017
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @wilzbach!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@wilzbach wilzbach force-pushed the upgrade-ddox branch 2 times, most recently from 08a291c to 9ddd84f Compare September 10, 2017 03:17
@wilzbach wilzbach changed the title [WIP] Upgrade ddox Upgrade ddox Sep 10, 2017
@wilzbach wilzbach removed the WIP label Sep 10, 2017
@wilzbach
Copy link
Contributor Author

This is WIP and at least gets dpl-docs compiling with ddox 0.16.

Finally got even the search working again. Should be good to go now - let's see what DAutoTest has to say.

- if (auto pp = cast(Package)pack.parent)
- return pp.lookup!Module(pack.name);
- return null;

Copy link
Member

Choose a reason for hiding this comment

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

Why remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it's defined in ddox.inc.utils.dt which is now in this scope too.

- moduleInfoRec(p);
- foreach( m; pack.modules )
- if (!m.qualifiedName.startsWith("std.c.") && !m.qualifiedName.startsWith("core.stdc.") && !m.qualifiedName.startsWith("core.sys."))
- auto qualifiedName = m.qualifiedName.to!string;
Copy link
Member

Choose a reason for hiding this comment

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

Why is .to!string necessary? .startsWith should work with any string.

@wilzbach wilzbach force-pushed the upgrade-ddox branch 3 times, most recently from 0fcfd05 to 8613e35 Compare September 10, 2017 22:55
ul
li
a(href="#{root_dir}spec/spec.html")Language Reference
a(href="#{root_dir}spec/spec.html") Language Reference
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Newer Diet versions enforce a whitespace before the text.

var disqus_shortname = 'vibe-d'; // required: replace example with your forum shortname
var disqus_developer = 1;
var disqus_identifier = #{"\\\"phobos-" ~ info.node.qualifiedName ~ "\\\""};
var disqus_identifier = #{text(`"phobos-`, info.node.qualifiedName.text, `"`)};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

info.node.qualifiedName was converted to a range (and isn't a string anymore)

block ddox.title

block navigation
include ddox.inc.utils
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wilzbach
Copy link
Contributor Author

Sadly due to a change in diet-ng, ddox now produces compact HTML, so the entire diff is unusable.
As far as I can see, we have two options:

@wilzbach
Copy link
Contributor Author

wait for dlang/ddox#166

Thanks to @s-ludwig's fast reaction time, the PR got in and has been applied for this PR, s.t. the diff hopefully will be small.
Afterwards in a follow-up PR, I will then switch from pretty-printing to compact in a new separate PR.

@wilzbach
Copy link
Contributor Author

, s.t. the diff hopefully will be small.

Sadly it's not due to other changes in the rendering of diet-ng
We could do the upgrade in yet another PR or simply move on with this.
@CyberShadow @ZombineDev what do you prefer?

@wilzbach
Copy link
Contributor Author

wilzbach commented Oct 5, 2017

@CyberShadow @ZombineDev what do you prefer?

Friendly ping ;-)

@CyberShadow
Copy link
Member

Friendly ping ;-)

IIRC the CI was failing at the time of your previous comment.

Still, this does not look right:

+									<a id="MemoryOrder" class="[&quot;public&quot;]" href="../core/atomic/memory_order.html">MemoryOrder</a>

@CyberShadow
Copy link
Member

There are a lot of whitespace changes, which make it difficult to find the other kinds.

Is it possible to split this into two or three PRs, one of which bumps past just the commits which introduce the whitespace changes? Or, more generally, one PR per ddox change which affects generated content would be even better.

@wilzbach wilzbach mentioned this pull request Oct 5, 2017
@wilzbach
Copy link
Contributor Author

wilzbach commented Oct 5, 2017

Is it possible to split this into two or three PRs, one of which bumps past just the commits which introduce the whitespace changes? Or, more generally, one PR per ddox change which affects generated content would be even better.

Tried to only bump diet-ng or vibe-d -> no changes.
However, when I bump ddox 0.15.18 to 0.16.0, we get the full load again:

#1902

(this PR doesn't include the compactHTML - false change).

Any other ideas?
CC @s-ludwig

@s-ludwig
Copy link
Member

s-ludwig commented Oct 8, 2017

We could of course make a PR that runs the output through some HTML formatter (e.g. "tidy", which is included in the Debian repositories), once for the current version and once for the new one.

class="[&quot;public&quot;]"

Good catch, that is a silent behavior change in diet-ng vs the old implementation. I kind of lean towards keeping the semantics and fixing it in Ddox, tough (dlang/ddox#171). I'll try to get to fixing the recently discovered issues ASAP.

@wilzbach
Copy link
Contributor Author

wilzbach commented Dec 5, 2017

We could of course make a PR that runs the output through some HTML formatter (e.g. "tidy", which is included in the Debian repositories), once for the current version and once for the new one.

-> #1940 (but it would be a lot easier if we find the problems directly).

Good catch, that is a silent behavior change in diet-ng vs the old implementation. I kind of lean towards keeping the semantics and fixing it in Ddox, tough (dlang/ddox#171).

I submitted both options as PRs: rejectedsoftware/diet-ng#41 and dlang/ddox#187.

@wilzbach
Copy link
Contributor Author

Good catch, that is a silent behavior change in diet-ng vs the old implementation. I kind of lean towards keeping the semantics and fixing it in Ddox, tough (dlang/ddox#171).
I submitted both options as PRs: rejectedsoftware/diet-ng#41 and dlang/ddox#187.

@s-ludwig we are still blocked on the Ddox regression for this update. Which PR do you prefer?

@wilzbach
Copy link
Contributor Author

Okay I took one file in the DDox, applied tidy to both versions and then compared it. I observed the following changes:

  • the order of attributes changed in diet-ng (e.g. before: <body id="core.atomic" class="std">, after: <body class="std" id="core.atomic">)
  • arguments are now displayed (e.g. <span class="decoration">(here, ifThis, writeThis)</span>) - this is a very nice improvement

So imho everything looks good now and I think we are finally ready to upgrade.
@CyberShadow what do you think?

Copy link
Member

@CyberShadow CyberShadow left a comment

Choose a reason for hiding this comment

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

¯\(ツ)

@MartinNowak
Copy link
Member

Nice, thanks for the effort. Gave it a shot myself, but it was quite tedious.

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.

6 participants