Skip to content

Conversation

@ywkaras
Copy link
Contributor

@ywkaras ywkaras commented Mar 28, 2018

No description provided.

d2r
d2r previously requested changes Apr 3, 2018
Copy link
Contributor

@d2r d2r left a comment

Choose a reason for hiding this comment

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

minor nitpick

library_includedir=$(includedir)/ts

library_include_HEADERS = apidefs.h string_view.h TextView.h
# IMPORTANT: These headers are exported for use by plugings. Any traffic server headers they in turn include, directly or
Copy link
Contributor

Choose a reason for hiding this comment

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

plugins

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll also fix another place this was misspelled that I found with fgrep/find.

BufferWriter.h \
BufferWriterForward.h \
MemSpan.h \
TextView.h
Copy link
Contributor

Choose a reason for hiding this comment

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

So this is effectively a white-list of headers that will be "publicly" visible to the plugins?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, they're copied to include/ts in the install tree.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, white-list sounds good. Nice comment there too.

@d2r d2r dismissed their stale review April 3, 2018 21:52

Comments were addressed

@SolidWallOfCode
Copy link
Member

I'm working on cleaning up these headers to remove dependencies on ATS internals. On a first pass, it looks like it is mainly ink_assert that is the problem.

I think it's fine to put ink_std_compat.h in the normal API area. Plugins may want to use those as well.

d2r
d2r previously approved these changes Apr 12, 2018
Copy link
Contributor

@d2r d2r left a comment

Choose a reason for hiding this comment

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

Changes seem OK to me. I did not do a thorough check of all transitively included header files, but I agree with @ywkaras that many cases in which we missed something would be revealed as compile errors and we aren't seeing those.

@SolidWallOfCode do you have any other concerns?

@ywkaras
Copy link
Contributor Author

ywkaras commented Apr 12, 2018

One thing to consider is the issue of any sort of ABI for C++ plugins. I think, with this change, we would definitely have to require that plugins were built with the same compiler and options as the core.

@ywkaras
Copy link
Contributor Author

ywkaras commented Apr 23, 2018

Example showing vague linkage does not occur with dynamically linked libraries. https://gist.github.com/ywkaras/2d28c3111903125eb47b9b594da4f905

@SolidWallOfCode
Copy link
Member

I really dislike the ts_no_api approach. We should instead either make those headers suitable for inclusion by plugins, or remove the dependencies.

@ywkaras
Copy link
Contributor Author

ywkaras commented Apr 24, 2018

In general, the header files for an interface will likely include other header files that should not be part of the interface. Maybe there's a better way to do it, but I don't think it's something that necessarily can be avoided.

@zwoop
Copy link
Contributor

zwoop commented Apr 25, 2018

[approve ci clang-format]

@SolidWallOfCode
Copy link
Member

I think we could do better, if necessary by splitting files so that the exposed interface files can include files that are not inappropriate for plugins.

Copy link
Contributor

@bryancall bryancall left a comment

Choose a reason for hiding this comment

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

I don't thin we need to have a ts_no_api directory. Only header files that are in the include install directories should be used for plugins. Also, mixing C++ and C files in the C header install directory (e.g. /usr/local/include/ts/) shouldn't be done.

@d2r d2r dismissed their stale review May 17, 2018 16:59

Dismissing because more discussion has revealed better approaches to this.

@ywkaras
Copy link
Contributor Author

ywkaras commented May 17, 2018

I have eliminated ts_no_api. @bryancall and @SolidWallOfCode can have a committer fight about the rest.

@ywkaras
Copy link
Contributor Author

ywkaras commented May 17, 2018

[approve ci CentOS]

@ywkaras
Copy link
Contributor Author

ywkaras commented May 18, 2018

[approve ci autest]

@SolidWallOfCode
Copy link
Member

Superseded by #3724.

@zwoop zwoop removed this from the 8.0.0 milestone Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants