{"action":"created","issue":{"url":"https://api.github.com/repos/apache/trafficserver/issues/3724","repository_url":"https://api.github.com/repos/apache/trafficserver","labels_url":"https://api.github.com/repos/apache/trafficserver/issues/3724/labels{/name}","comments_url":"https://api.github.com/repos/apache/trafficserver/issues/3724/comments","events_url":"https://api.github.com/repos/apache/trafficserver/issues/3724/events","html_url":"https://github.com/apache/trafficserver/pull/3724","id":325843265,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwMDgxMjM3","number":3724,"title":"Unify include paths for headers between core, internal plugins, and external plugins.","user":{"login":"SolidWallOfCode","id":1545753,"node_id":"MDQ6VXNlcjE1NDU3NTM=","avatar_url":"https://avatars2.githubusercontent.com/u/1545753?v=4","gravatar_id":"","url":"https://api.github.com/users/SolidWallOfCode","html_url":"https://github.com/SolidWallOfCode","followers_url":"https://api.github.com/users/SolidWallOfCode/followers","following_url":"https://api.github.com/users/SolidWallOfCode/following{/other_user}","gists_url":"https://api.github.com/users/SolidWallOfCode/gists{/gist_id}","starred_url":"https://api.github.com/users/SolidWallOfCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolidWallOfCode/subscriptions","organizations_url":"https://api.github.com/users/SolidWallOfCode/orgs","repos_url":"https://api.github.com/users/SolidWallOfCode/repos","events_url":"https://api.github.com/users/SolidWallOfCode/events{/privacy}","received_events_url":"https://api.github.com/users/SolidWallOfCode/received_events","type":"User","site_admin":false},"labels":[{"id":375916898,"node_id":"MDU6TGFiZWwzNzU5MTY4OTg=","url":"https://api.github.com/repos/apache/trafficserver/labels/TS%20API","name":"TS API","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":{"login":"SolidWallOfCode","id":1545753,"node_id":"MDQ6VXNlcjE1NDU3NTM=","avatar_url":"https://avatars2.githubusercontent.com/u/1545753?v=4","gravatar_id":"","url":"https://api.github.com/users/SolidWallOfCode","html_url":"https://github.com/SolidWallOfCode","followers_url":"https://api.github.com/users/SolidWallOfCode/followers","following_url":"https://api.github.com/users/SolidWallOfCode/following{/other_user}","gists_url":"https://api.github.com/users/SolidWallOfCode/gists{/gist_id}","starred_url":"https://api.github.com/users/SolidWallOfCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolidWallOfCode/subscriptions","organizations_url":"https://api.github.com/users/SolidWallOfCode/orgs","repos_url":"https://api.github.com/users/SolidWallOfCode/repos","events_url":"https://api.github.com/users/SolidWallOfCode/events{/privacy}","received_events_url":"https://api.github.com/users/SolidWallOfCode/received_events","type":"User","site_admin":false},"assignees":[{"login":"SolidWallOfCode","id":1545753,"node_id":"MDQ6VXNlcjE1NDU3NTM=","avatar_url":"https://avatars2.githubusercontent.com/u/1545753?v=4","gravatar_id":"","url":"https://api.github.com/users/SolidWallOfCode","html_url":"https://github.com/SolidWallOfCode","followers_url":"https://api.github.com/users/SolidWallOfCode/followers","following_url":"https://api.github.com/users/SolidWallOfCode/following{/other_user}","gists_url":"https://api.github.com/users/SolidWallOfCode/gists{/gist_id}","starred_url":"https://api.github.com/users/SolidWallOfCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolidWallOfCode/subscriptions","organizations_url":"https://api.github.com/users/SolidWallOfCode/orgs","repos_url":"https://api.github.com/users/SolidWallOfCode/repos","events_url":"https://api.github.com/users/SolidWallOfCode/events{/privacy}","received_events_url":"https://api.github.com/users/SolidWallOfCode/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/apache/trafficserver/milestones/19","html_url":"https://github.com/apache/trafficserver/milestone/19","labels_url":"https://api.github.com/repos/apache/trafficserver/milestones/19/labels","id":3358032,"node_id":"MDk6TWlsZXN0b25lMzM1ODAzMg==","number":19,"title":"9.0.0","description":"","creator":{"login":"bryancall","id":216749,"node_id":"MDQ6VXNlcjIxNjc0OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/216749?v=4","gravatar_id":"","url":"https://api.github.com/users/bryancall","html_url":"https://github.com/bryancall","followers_url":"https://api.github.com/users/bryancall/followers","following_url":"https://api.github.com/users/bryancall/following{/other_user}","gists_url":"https://api.github.com/users/bryancall/gists{/gist_id}","starred_url":"https://api.github.com/users/bryancall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryancall/subscriptions","organizations_url":"https://api.github.com/users/bryancall/orgs","repos_url":"https://api.github.com/users/bryancall/repos","events_url":"https://api.github.com/users/bryancall/events{/privacy}","received_events_url":"https://api.github.com/users/bryancall/received_events","type":"User","site_admin":false},"open_issues":36,"closed_issues":54,"state":"open","created_at":"2018-05-18T19:12:59Z","updated_at":"2018-08-02T20:33:37Z","due_on":"2019-06-30T07:00:00Z","closed_at":null},"comments":15,"created_at":"2018-05-23T19:30:44Z","updated_at":"2018-08-03T14:53:47Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/apache/trafficserver/pulls/3724","html_url":"https://github.com/apache/trafficserver/pull/3724","diff_url":"https://github.com/apache/trafficserver/pull/3724.diff","patch_url":"https://github.com/apache/trafficserver/pull/3724.patch"},"body":"**Updated based on feedback**\r\n\r\n- include/ts for C API headers.\r\n- include/tscpp for C++ API headers (link with libtscpp.so)\r\n- include/tsutil for C++ utility headers (link with libtsutil.so)\r\n\r\n`lib/ts` is moved to `lib/tscore` which builds the `libtscore` library. A new directory, \"lib/tsutil\", is created for \"dual use\" utility C++ headers which builds `libtsutil`. These are headers used in the TS core and intended to be available to plugins. The goal of this restructuring is to unify include paths for core, internal plugins, and external plugins. That in turn enables exporting the dual use utility headers such as `TextView.h`. With the include paths the same, secondary includes will work as expected.\r\n\r\nThis only moves the installed version of `TextView.h` to `include/tsutil` as a demonstration and to validate the feasibility of making the move. This current structure is the result of many discussions on this PR, the mailing list, and the IRC channel.\r\n\r\n*UPDATE*\r\n\r\nAll references to \"atscppapi\" have been changed to \"tscpp\". This includes the library name and the internal library namespace. The \"README` file in this PR has been updated to reflect the re-arrangement.\r\n\r\n* `ts/...` : C API functions.\r\n* `tscpp/...` : C++ API functions.\r\n* `tsutil/...` : Internally used utilities not dependent on TS specifically.\r\n* `tscore/...` : Internal use only libraries.\r\n\r\nThese paths become the same for core and plugins so that internal plugins have less of a privileged position over external plugins and serve as better examples for plugin developers.\r\n\r\n`lib/ts` was split into `libtscore` and `libtsutil` so that the dual use headers were in a separate library than the purely core headers. This was recommended by both @bryancall and @dragon512.\r\n\r\nKey issues to handle for exporting dual use C++ headers -\r\n\r\n* The include path for a given header (e.g. `TextView.h`) must be the same between the core and a plugin because of headers including other headers.\r\n* Care must be taken to not impose core based requirements on plugins (e.g., not using `assert` at all).\r\n* I would like to minimize the number of `-I` include options on the compiler line. Relatedly, having include paths that have semantic meaning would help ease the pain of them being longer.\r\n* Avoid having \"magic\" or other \"don't really include this\" headers. Dual use headers need to not drag in other entangled headers. Let's not be Boost."},"comment":{"url":"https://api.github.com/repos/apache/trafficserver/issues/comments/410278654","html_url":"https://github.com/apache/trafficserver/pull/3724#issuecomment-410278654","issue_url":"https://api.github.com/repos/apache/trafficserver/issues/3724","id":410278654,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDI3ODY1NA==","user":{"login":"d2r","id":905298,"node_id":"MDQ6VXNlcjkwNTI5OA==","avatar_url":"https://avatars1.githubusercontent.com/u/905298?v=4","gravatar_id":"","url":"https://api.github.com/users/d2r","html_url":"https://github.com/d2r","followers_url":"https://api.github.com/users/d2r/followers","following_url":"https://api.github.com/users/d2r/following{/other_user}","gists_url":"https://api.github.com/users/d2r/gists{/gist_id}","starred_url":"https://api.github.com/users/d2r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d2r/subscriptions","organizations_url":"https://api.github.com/users/d2r/orgs","repos_url":"https://api.github.com/users/d2r/repos","events_url":"https://api.github.com/users/d2r/events{/privacy}","received_events_url":"https://api.github.com/users/d2r/received_events","type":"User","site_admin":false},"created_at":"2018-08-03T14:53:47Z","updated_at":"2018-08-03T14:53:47Z","author_association":"CONTRIBUTOR","body":"> Because you would like to have the files in the normal places, rather than gathered off to the side in an obscure place. E.g. binaries under \"/usr/bin\", log files in \"/var/log/...\", libraries in \"/usr/lib/...\", etc.\r\n\r\nOK. I thought `configure` could do this now. And for plugin building, I thought `tsxs` used the same paths.\r\n\r\n```\r\n$ ./configure --help\r\n...\r\nBy default, `make install' will install all the files in\r\n`/usr/local/trafficserver/bin', `/usr/local/trafficserver/lib' etc.  You can specify\r\nan installation prefix other than `/usr/local/trafficserver' using `--prefix',\r\nfor instance `--prefix=$HOME'.\r\n\r\nFor better control, use the options below.\r\n\r\nFine tuning of the installation directories:\r\n  --bindir=DIR            user executables [EPREFIX/bin]\r\n  --sbindir=DIR           system admin executables [EPREFIX/sbin]\r\n  --libexecdir=DIR        program executables [EPREFIX/libexec]\r\n  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]\r\n  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]\r\n  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]\r\n  --libdir=DIR            object code libraries [EPREFIX/lib]\r\n  --includedir=DIR        C header files [PREFIX/include]\r\n  --oldincludedir=DIR     C header files for non-gcc [/usr/include]\r\n  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]\r\n  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]\r\n  --infodir=DIR           info documentation [DATAROOTDIR/info]\r\n  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]\r\n  --mandir=DIR            man documentation [DATAROOTDIR/man]\r\n  --docdir=DIR            documentation root [DATAROOTDIR/doc/trafficserver]\r\n  --htmldir=DIR           html documentation [DOCDIR]\r\n  --dvidir=DIR            dvi documentation [DOCDIR]\r\n  --pdfdir=DIR            pdf documentation [DOCDIR]\r\n  --psdir=DIR             ps documentation [DOCDIR]\r\n```\r\n\r\nSo I'd expect things like `--includedir=/usr/include/ts7` to work. But maybe they don't or it is not sufficient?"}}
{"actor":{"display_login":"d2r"}}