Skip to content
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

Remove findtags in favor of using chmgen-emitted tags #156

Merged
merged 1 commit into from
Feb 11, 2015

Conversation

CyberShadow
Copy link
Member

This makes Dman use the d.tag file generated by chmgen, which is highly (if not completely) comprehensive of the D spec, Phobos and Druntime.

As findtags is no longer needed, it is removed.

Requires dlang/dlang.org#873

CC @WalterBright

$(DOC)/chmgen : $(DOC)/chmgen.d
$(DMD) -g -of$@ $<

ALL_OF_PHOBOS_DRUNTIME_AND_DLANG_ORG = # ???
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 know what to write here.

Copy link
Member

Choose a reason for hiding this comment

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

FWIW a concatenation of $(SPEC_ROOT) with druntime and phobos documentables sounds like a good start.

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. There is no SPEC_ROOT in tools/posix.mak or tools/win32.mak.
  2. How am I supposed to get the "druntime and phobos documentables" without three pages of copy-pasta?

Choose a reason for hiding this comment

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

btw, I am currently experimenting with providing a meta-repository that would host all existing ones as submodules. If it will work, we could move such scripts to that repo. Maybe even integrate Digger with it ;)

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.

I don't know what to write here.

I'd say $(wildcard $(DOCS)/*.html) $(wildcard $(DOCS)/Phobos/*.html) if we'd use gmake on Windows.
How about you pass the DOCS folder to chmgen and let it find all HTML files. Might add an explicit exclude argument if really necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

How about you pass the DOCS folder to chmgen and let it find all HTML files.

It already finds HTML files by itself (though the directory is currently hardcoded). The difficulty is Make target dependencies (i.e. we want dman.exe to be rebuilt if lex.dd changed).

Copy link
Member

Choose a reason for hiding this comment

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

That won't work without another hand maintained list of all files. Rather rebuild it every time.

Copy link
Member Author

Choose a reason for hiding this comment

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

That won't work without another hand maintained list of all files.

Yeah.

Rather rebuild it every time.

Is this really the best solution? For such a relatively unimportant utility, I think it makes more sense to let it rebuild only after a make clean.

Copy link
Member

Choose a reason for hiding this comment

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

That would work as well, d a comment. The release scripts are probably the only place this is used.

@MartinNowak
Copy link
Member

Nice the findtags tool doesn't yet work with the new layout anyhow and blocks release building.

@MartinNowak MartinNowak added this to the 2.067 milestone Feb 3, 2015
MartinNowak added a commit that referenced this pull request Feb 11, 2015
Remove findtags in favor of using chmgen-emitted tags
@MartinNowak MartinNowak merged commit 8ea05fb into dlang:master Feb 11, 2015
@MartinNowak
Copy link
Member

Somethings wrong with the pathes for chmgen, seems like I need to build from dlang.org/web or I get.

object.Exception@../dlang.org/chmgen.d(138): Phobos documentation not present. Please place Phobos documentation HTML files into the "phobos" subdirectory.

@CyberShadow
Copy link
Member Author

Hmm, that's the default location for the Phobos documentation on Windows. I guess it might make sense to make the makefile pass the location to chmgen instead.

@MartinNowak
Copy link
Member

I guess it might make sense to make the makefile pass the location to chmgen instead.

It's dlang.org/web/phobos on posix.mak, so yes, passing as argument makes sense.

@CyberShadow CyberShadow mentioned this pull request Feb 12, 2015
@CyberShadow
Copy link
Member Author

#160

@CyberShadow
Copy link
Member Author

BTW, I wonder if we can refactor the makefiles into parts that can be included from makefiles of other components. Then we can get a precise dependency graph.

@MartinNowak
Copy link
Member

Hey, this was really great, now dman is 100x more useful.
Might be worth an announcement, e.g. in the changelog.

@MartinNowak
Copy link
Member

We recently added a fuzzy string matcher to dub (yet unused and untested ◔_◔), which might be useful here as well.
https://github.com/D-Programming-Language/dub/blob/ad9b43d6a150b53872db73c161e745c000cf8577/source/dub/internal/utils.d#L246

I still want to write a real string matcher library à la Lucene, but didn't yet got to it.

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.

None yet

5 participants