Skip to content

Comments

Move html gen to build.d#10516

Merged
dlang-bot merged 1 commit intodlang:masterfrom
marler8997:htmlBuild
Oct 31, 2019
Merged

Move html gen to build.d#10516
dlang-bot merged 1 commit intodlang:masterfrom
marler8997:htmlBuild

Conversation

@marler8997
Copy link
Contributor

No description provided.

@marler8997 marler8997 force-pushed the htmlBuild branch 9 times, most recently from 4ac070e to 4401e78 Compare October 30, 2019 07:16
@marler8997 marler8997 marked this pull request as ready for review October 30, 2019 07:41
Copy link
Contributor

@MoonlightSentinel MoonlightSentinel left a comment

Choose a reason for hiding this comment

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

Some suggestions

src/build.d Outdated
htmlDep.name = "html";
htmlDep.description = "Generate html docs, requires DMD and STDDOC to be set";
auto docSources = .sources.root ~ .sources.lexer ~ .sources.dmd ~ env["D"].buildPath("frontend.d");
if (env.get("DMD", null).length == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why another variable instead of HOST_DMD_RUN?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The documentation builder uses the DMD environment variable to select the compiler to generate the documentation.

src/build.d Outdated
"-Df" ~ docDep.target,
docSources[i]
] ~ flags["DFLAGS"];
docDep.msg = docDep.command.join(" ");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
docDep.msg = docDep.command.join(" ");
docDep.msg = docDep.target

Less noisy, --dry-run already exists to dump the invoked command

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we want to see the commands in the CI builders though.--dry-run is for developers


######## DMD frontend source files

FRONT_SRCS=$(addsuffix .d, $(addprefix $D/,access aggregate aliasthis apply argtypes argtypes_sysv_x64 arrayop \
Copy link
Contributor

Choose a reason for hiding this comment

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

Are all these deletions actually related to html generation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

html gen is the last piece referencing these variables

Copy link
Contributor

Choose a reason for hiding this comment

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

And then users won't be able to use the makefile for that anymore?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, all build scripts still use make, but make itself calls build.d
Check the logs, e.g.

http://dtest.dlang.io/results/ddac83cc356942c2071e3b6f7fb5654321f4dc45/4401e78b940d83bacdcb4522b12fce78a9a899c1/build.log

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, all build scripts still use make, but make itself calls build.d

Yup, a clever idea if I do say so myself :) It's allowed us to gradually move config from the makefiles to build.d, testing each piece in isolation along the way. We are nearing the end, where now we're able to start removing redundant config from the makefiles, but you can still use the "make" tools to build.

@wilzbach
Copy link
Contributor

Mind the DAutotTest logs:

diff --git a/web/phobos-prerelease/dmd_access.html b/web/phobos-prerelease/dmd_access.html
index 5315855..957b499 100644
--- a/web/phobos-prerelease/dmd_access.html
+++ b/web/phobos-prerelease/dmd_access.html
@@ -162,7 +162,7 @@
 		<div >			If you spot a problem with this page, click here to create a Bugzilla issue.
 		</div>
 	</div>
-	<div class="tip smallprint">		<a href="https://github.com/dlang/dmd/edit/master/dmd/access.d">Improve this page</a>
+	<div class="tip smallprint">		<a href="https://github.com/dlang/dmd/edit/master//dev/shm/dtest/work/repo/dmd/src/dmd/access.d">Improve this page</a>
 		<div >			Quickly fork, edit online, and submit a pull request for this page.
 			Requires a signed-in GitHub account. This works well for small changes.
 			If you'd like to make larger changes you may want to consider using

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @marler8997! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

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

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.

Testing this PR locally

If 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#10516"

@marler8997 marler8997 force-pushed the htmlBuild branch 7 times, most recently from 105e4e7 to 94c2188 Compare October 30, 2019 22:13
@marler8997
Copy link
Contributor Author

Mind the DAutotTest logs: ...

I switched to passing relative paths for the main source file in ddoc generation and this seems to have fixed the ddoc links.

@marler8997
Copy link
Contributor Author

Getting this error on the GDC build...is slide a new function or was it moved at some point?

build.d:555:35: error: function std.range.slide!(cast(Flag)true, string[]).slide is not accessible from module build
  555 |         docDeps = docSources.slide(1).map!(sourceArray => {
      |      

@marler8997
Copy link
Contributor Author

marler8997 commented Oct 30, 2019

Actually it looks like chunks should work as well, and we'are already using that one elsewhere so it should work.

@wilzbach
Copy link
Contributor

Getting this error on the GDC build...is slide a new function or was it moved at some point?

Yeah, I added it in 2.079.

dlang/phobos#5943
https://dlang.org/changelog/2.079.0.html#std-range-slide

GDC 8/9 are based on Phobos 2.076.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants