Skip to content

tidy installs platform.h #223

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

Closed
ryandesign opened this issue Jun 24, 2015 · 2 comments
Closed

tidy installs platform.h #223

ryandesign opened this issue Jun 24, 2015 · 2 comments
Milestone

Comments

@ryandesign
Copy link

Tidy installs an include file called platform.h in the general include directory (e.g. /opt/local/include in MacPorts). This is a problem because the name of the file is so generic.

This can cause problems with other programs that happen to have a private include file of the same name in their source directory. With a generic name like "platform.h", this is not unlikely. When they write #include "platform.h" they expect to get their private file, but -I/opt/local/include might be in CPPFLAGS, either because the package manager or the user put it there (MacPorts does), or because the project got it from the pkg-config file or *-config script of one of its dependencies. If the project's build system is such that -I/opt/local/include appears before -I. in the compiler invocation, then tidy's platform.h would be used instead of the project's, leading to build failure. That would be an error in that project's build system, but such errors are very common.

In MacPorts, this problem affects qscintilla, and also scite, which uses qscintilla, and probably anything else that uses scintilla or qscintilla.

Please consider either not installing platform.h, or renaming it to tidyplatform.h such that its name is less generic and its association with tidy is clear (which would match the naming of the file tidyenum.h), or moving it and all other installed include files that aren't tidy.h (including buffio.h, whose name is also generic) into a tidy subdirectory (e.g. /opt/local/include/tidy).

@geoffmcl
Copy link
Contributor

@ryandesign this is a very valid point. One that has concerned my for quite some time, as I have experienced these generic header name problems several times before...

One of the worst is the many projects that use and install a config.h ;=() And although tidy does have a config.h, it is only local, and not installed.

I think I would go for the platform.h to tidyplatform.h, and buffio.h to tidybuffio.h rather than the alternative of changing to <tidy/titdy.h>, thus installing in a tidy sub-directory, but will reflect upon this a little...

And now is a good time to make this change before the release, so will not reflect for too long ;=)).

Look forward to any other comments...

geoffmcl added a commit that referenced this issue Jun 30, 2015
But this seemed a good time to release 5.0.0.RC1...
@geoffmcl
Copy link
Contributor

@ryandesign done and issued 5.0.0.RC1 at the same time...

@geoffmcl geoffmcl added this to the 5.0.0 milestone Sep 17, 2015
vcunat referenced this issue in NixOS/nixpkgs Nov 29, 2015
- the original project has been unmaintained for years
- some dependants needed to be patched due to renamed headers
  htacg/tidy-html5#326 (comment)
- separate tidy-html5 package was removed, as since the 5.0.0 version
  it's meant as a successor to both, and library name got back
  from libtidy5.so to libtidy.so
  htacg/tidy-html5#326 (comment)

/cc committers to tidy-html5: @edwjto and @zimbatm.
MarcusCalhoun-Lopez added a commit to macports/macports-ports that referenced this issue Nov 5, 2017
The port tidy no longer installs platform.h, so there is no
need for a workaround.

See htacg/tidy-html5#223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants