{"action":"created","comment":{"url":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/comments/203648029","pull_request_review_id":138577231,"id":203648029,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzY0ODAyOQ==","diff_hunk":"@@ -0,0 +1,63 @@\n+#ifndef CC_SERVICE_CPPREPARSESERVICE_H\n+#define CC_SERVICE_CPPREPARSESERVICE_H\n+\n+#include <string>\n+#include <memory>\n+\n+#include <boost/program_options/variables_map.hpp>\n+\n+#include <odb/database.hxx>\n+\n+#include <util/odbtransaction.h>\n+#include <webserver/servercontext.h>\n+\n+#include <CppReparseService.h>\n+\n+namespace cc\n+{\n+\n+namespace service\n+{\n+\n+namespace reparse\n+{\n+\n+class ASTCache;\n+class CppReparser;\n+\n+} // namespace reparse\n+\n+namespace language\n+{\n+\n+class CppReparseServiceHandler: virtual public CppReparseServiceIf\n+{\n+public:\n+  CppReparseServiceHandler(\n+    std::shared_ptr<odb::database> db_,\n+    std::shared_ptr<std::string> datadir_,\n+    const cc::webserver::ServerContext& context_);\n+\n+  ~CppReparseServiceHandler();\n+\n+  virtual bool isEnabled() override;\n+\n+  virtual void getAsHTML(\n+    std::string& return_,\n+    const core::FileId& fileId_) override;\n+\n+private:\n+  std::shared_ptr<odb::database> _db;\n+  util::OdbTransaction _transaction;\n+  const boost::program_options::variables_map& _config;\n+  std::shared_ptr<std::string> _datadir;","path":"plugins/cpp_reparse/service/include/service/cppreparseservice.h","position":null,"original_position":53,"commit_id":"38f43040b5f43d2d83549332216720d4046df129","original_commit_id":"78e35bc6ea1a816383f98c139abe451b6627ea7b","user":{"login":"whisperity","id":1969470,"node_id":"MDQ6VXNlcjE5Njk0NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1969470?v=4","gravatar_id":"","url":"https://api.github.com/users/whisperity","html_url":"https://github.com/whisperity","followers_url":"https://api.github.com/users/whisperity/followers","following_url":"https://api.github.com/users/whisperity/following{/other_user}","gists_url":"https://api.github.com/users/whisperity/gists{/gist_id}","starred_url":"https://api.github.com/users/whisperity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whisperity/subscriptions","organizations_url":"https://api.github.com/users/whisperity/orgs","repos_url":"https://api.github.com/users/whisperity/repos","events_url":"https://api.github.com/users/whisperity/events{/privacy}","received_events_url":"https://api.github.com/users/whisperity/received_events","type":"User","site_admin":false},"body":"Good catch, I fixed it. I was thinking of putting this into the \"ServerContext\" back in the patch that introduced this notion... It was months ago, so I don't remember why I didn't, although there was a reason why ODB and DataDir could not have been included into that struct. :neutral_face: ","created_at":"2018-07-19T08:51:20Z","updated_at":"2018-07-19T08:51:20Z","html_url":"https://github.com/Ericsson/CodeCompass/pull/248#discussion_r203648029","pull_request_url":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/248","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/comments/203648029"},"html":{"href":"https://github.com/Ericsson/CodeCompass/pull/248#discussion_r203648029"},"pull_request":{"href":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/248"}},"in_reply_to_id":203510640},"pull_request":{"url":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/248","id":186645001,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg2NjQ1MDAx","html_url":"https://github.com/Ericsson/CodeCompass/pull/248","diff_url":"https://github.com/Ericsson/CodeCompass/pull/248.diff","patch_url":"https://github.com/Ericsson/CodeCompass/pull/248.patch","issue_url":"https://api.github.com/repos/Ericsson/CodeCompass/issues/248","number":248,"state":"open","locked":false,"title":"Reparse: Generate colourful `-ast-dump` HTML in the browser","user":{"login":"whisperity","id":1969470,"node_id":"MDQ6VXNlcjE5Njk0NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1969470?v=4","gravatar_id":"","url":"https://api.github.com/users/whisperity","html_url":"https://github.com/whisperity","followers_url":"https://api.github.com/users/whisperity/followers","following_url":"https://api.github.com/users/whisperity/following{/other_user}","gists_url":"https://api.github.com/users/whisperity/gists{/gist_id}","starred_url":"https://api.github.com/users/whisperity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whisperity/subscriptions","organizations_url":"https://api.github.com/users/whisperity/orgs","repos_url":"https://api.github.com/users/whisperity/repos","events_url":"https://api.github.com/users/whisperity/events{/privacy}","received_events_url":"https://api.github.com/users/whisperity/received_events","type":"User","site_admin":false},"body":"This patch introduces the reparse capability which allows arbitrary\r\nserverside code to run an AST generation of Clang, using purely the file\r\ncontents and build configuration stored in the database.\r\n\r\nTo see the results of the parse, the command-line output obtainable via\r\n`clang -Xclang -ast-dump` is available as a coloured HTML over the API.\r\n\r\nAn example of the output for a small translation unit containing two functions. The user right-clicks on the file and says `C++ > Show AST HTML` and gets this view.\r\n\r\n![reparse 1](https://user-images.githubusercontent.com/1969470/39761194-bc6a1a46-52d7-11e8-9c68-1dae9187fd6e.png)\r\n","created_at":"2018-05-08T14:03:50Z","updated_at":"2018-07-19T08:51:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fec121e5c34e95d6dbf0ff05540220ad1ec4adec","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":349832359,"node_id":"MDU6TGFiZWwzNDk4MzIzNTk=","url":"https://api.github.com/repos/Ericsson/CodeCompass/labels/Kind:%20Enhancement","name":"Kind: Enhancement","color":"84b6eb","default":false},{"id":913322555,"node_id":"MDU6TGFiZWw5MTMzMjI1NTU=","url":"https://api.github.com/repos/Ericsson/CodeCompass/labels/Target:%20C++","name":"Target: C++","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/248/commits","review_comments_url":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/248/comments","review_comment_url":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ericsson/CodeCompass/issues/248/comments","statuses_url":"https://api.github.com/repos/Ericsson/CodeCompass/statuses/38f43040b5f43d2d83549332216720d4046df129","head":{"label":"whisperity:reparse_1","ref":"reparse_1","sha":"38f43040b5f43d2d83549332216720d4046df129","user":{"login":"whisperity","id":1969470,"node_id":"MDQ6VXNlcjE5Njk0NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1969470?v=4","gravatar_id":"","url":"https://api.github.com/users/whisperity","html_url":"https://github.com/whisperity","followers_url":"https://api.github.com/users/whisperity/followers","following_url":"https://api.github.com/users/whisperity/following{/other_user}","gists_url":"https://api.github.com/users/whisperity/gists{/gist_id}","starred_url":"https://api.github.com/users/whisperity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whisperity/subscriptions","organizations_url":"https://api.github.com/users/whisperity/orgs","repos_url":"https://api.github.com/users/whisperity/repos","events_url":"https://api.github.com/users/whisperity/events{/privacy}","received_events_url":"https://api.github.com/users/whisperity/received_events","type":"User","site_admin":false},"repo":{"id":63327596,"node_id":"MDEwOlJlcG9zaXRvcnk2MzMyNzU5Ng==","name":"CodeCompass","full_name":"whisperity/CodeCompass","owner":{"login":"whisperity","id":1969470,"node_id":"MDQ6VXNlcjE5Njk0NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1969470?v=4","gravatar_id":"","url":"https://api.github.com/users/whisperity","html_url":"https://github.com/whisperity","followers_url":"https://api.github.com/users/whisperity/followers","following_url":"https://api.github.com/users/whisperity/following{/other_user}","gists_url":"https://api.github.com/users/whisperity/gists{/gist_id}","starred_url":"https://api.github.com/users/whisperity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whisperity/subscriptions","organizations_url":"https://api.github.com/users/whisperity/orgs","repos_url":"https://api.github.com/users/whisperity/repos","events_url":"https://api.github.com/users/whisperity/events{/privacy}","received_events_url":"https://api.github.com/users/whisperity/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/whisperity/CodeCompass","description":"CodeCompass is a software comprehension tool for large scale software written in C/C++ and Java","fork":true,"url":"https://api.github.com/repos/whisperity/CodeCompass","forks_url":"https://api.github.com/repos/whisperity/CodeCompass/forks","keys_url":"https://api.github.com/repos/whisperity/CodeCompass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whisperity/CodeCompass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whisperity/CodeCompass/teams","hooks_url":"https://api.github.com/repos/whisperity/CodeCompass/hooks","issue_events_url":"https://api.github.com/repos/whisperity/CodeCompass/issues/events{/number}","events_url":"https://api.github.com/repos/whisperity/CodeCompass/events","assignees_url":"https://api.github.com/repos/whisperity/CodeCompass/assignees{/user}","branches_url":"https://api.github.com/repos/whisperity/CodeCompass/branches{/branch}","tags_url":"https://api.github.com/repos/whisperity/CodeCompass/tags","blobs_url":"https://api.github.com/repos/whisperity/CodeCompass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whisperity/CodeCompass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whisperity/CodeCompass/git/refs{/sha}","trees_url":"https://api.github.com/repos/whisperity/CodeCompass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whisperity/CodeCompass/statuses/{sha}","languages_url":"https://api.github.com/repos/whisperity/CodeCompass/languages","stargazers_url":"https://api.github.com/repos/whisperity/CodeCompass/stargazers","contributors_url":"https://api.github.com/repos/whisperity/CodeCompass/contributors","subscribers_url":"https://api.github.com/repos/whisperity/CodeCompass/subscribers","subscription_url":"https://api.github.com/repos/whisperity/CodeCompass/subscription","commits_url":"https://api.github.com/repos/whisperity/CodeCompass/commits{/sha}","git_commits_url":"https://api.github.com/repos/whisperity/CodeCompass/git/commits{/sha}","comments_url":"https://api.github.com/repos/whisperity/CodeCompass/comments{/number}","issue_comment_url":"https://api.github.com/repos/whisperity/CodeCompass/issues/comments{/number}","contents_url":"https://api.github.com/repos/whisperity/CodeCompass/contents/{+path}","compare_url":"https://api.github.com/repos/whisperity/CodeCompass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whisperity/CodeCompass/merges","archive_url":"https://api.github.com/repos/whisperity/CodeCompass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whisperity/CodeCompass/downloads","issues_url":"https://api.github.com/repos/whisperity/CodeCompass/issues{/number}","pulls_url":"https://api.github.com/repos/whisperity/CodeCompass/pulls{/number}","milestones_url":"https://api.github.com/repos/whisperity/CodeCompass/milestones{/number}","notifications_url":"https://api.github.com/repos/whisperity/CodeCompass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whisperity/CodeCompass/labels{/name}","releases_url":"https://api.github.com/repos/whisperity/CodeCompass/releases{/id}","deployments_url":"https://api.github.com/repos/whisperity/CodeCompass/deployments","created_at":"2016-07-14T10:36:13Z","updated_at":"2018-06-14T18:20:22Z","pushed_at":"2018-07-19T08:35:38Z","git_url":"git://github.com/whisperity/CodeCompass.git","ssh_url":"git@github.com:whisperity/CodeCompass.git","clone_url":"https://github.com/whisperity/CodeCompass.git","svn_url":"https://github.com/whisperity/CodeCompass","homepage":null,"size":28441,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Ericsson:master","ref":"master","sha":"c48889c1d458d305476265312a4499528e720bf2","user":{"login":"Ericsson","id":4161311,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjEzMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/4161311?v=4","gravatar_id":"","url":"https://api.github.com/users/Ericsson","html_url":"https://github.com/Ericsson","followers_url":"https://api.github.com/users/Ericsson/followers","following_url":"https://api.github.com/users/Ericsson/following{/other_user}","gists_url":"https://api.github.com/users/Ericsson/gists{/gist_id}","starred_url":"https://api.github.com/users/Ericsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ericsson/subscriptions","organizations_url":"https://api.github.com/users/Ericsson/orgs","repos_url":"https://api.github.com/users/Ericsson/repos","events_url":"https://api.github.com/users/Ericsson/events{/privacy}","received_events_url":"https://api.github.com/users/Ericsson/received_events","type":"Organization","site_admin":false},"repo":{"id":55053239,"node_id":"MDEwOlJlcG9zaXRvcnk1NTA1MzIzOQ==","name":"CodeCompass","full_name":"Ericsson/CodeCompass","owner":{"login":"Ericsson","id":4161311,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjEzMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/4161311?v=4","gravatar_id":"","url":"https://api.github.com/users/Ericsson","html_url":"https://github.com/Ericsson","followers_url":"https://api.github.com/users/Ericsson/followers","following_url":"https://api.github.com/users/Ericsson/following{/other_user}","gists_url":"https://api.github.com/users/Ericsson/gists{/gist_id}","starred_url":"https://api.github.com/users/Ericsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ericsson/subscriptions","organizations_url":"https://api.github.com/users/Ericsson/orgs","repos_url":"https://api.github.com/users/Ericsson/repos","events_url":"https://api.github.com/users/Ericsson/events{/privacy}","received_events_url":"https://api.github.com/users/Ericsson/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ericsson/CodeCompass","description":"CodeCompass is a software comprehension tool for large scale software written in C/C++ and Java","fork":false,"url":"https://api.github.com/repos/Ericsson/CodeCompass","forks_url":"https://api.github.com/repos/Ericsson/CodeCompass/forks","keys_url":"https://api.github.com/repos/Ericsson/CodeCompass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ericsson/CodeCompass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ericsson/CodeCompass/teams","hooks_url":"https://api.github.com/repos/Ericsson/CodeCompass/hooks","issue_events_url":"https://api.github.com/repos/Ericsson/CodeCompass/issues/events{/number}","events_url":"https://api.github.com/repos/Ericsson/CodeCompass/events","assignees_url":"https://api.github.com/repos/Ericsson/CodeCompass/assignees{/user}","branches_url":"https://api.github.com/repos/Ericsson/CodeCompass/branches{/branch}","tags_url":"https://api.github.com/repos/Ericsson/CodeCompass/tags","blobs_url":"https://api.github.com/repos/Ericsson/CodeCompass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ericsson/CodeCompass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ericsson/CodeCompass/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ericsson/CodeCompass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ericsson/CodeCompass/statuses/{sha}","languages_url":"https://api.github.com/repos/Ericsson/CodeCompass/languages","stargazers_url":"https://api.github.com/repos/Ericsson/CodeCompass/stargazers","contributors_url":"https://api.github.com/repos/Ericsson/CodeCompass/contributors","subscribers_url":"https://api.github.com/repos/Ericsson/CodeCompass/subscribers","subscription_url":"https://api.github.com/repos/Ericsson/CodeCompass/subscription","commits_url":"https://api.github.com/repos/Ericsson/CodeCompass/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ericsson/CodeCompass/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ericsson/CodeCompass/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ericsson/CodeCompass/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ericsson/CodeCompass/contents/{+path}","compare_url":"https://api.github.com/repos/Ericsson/CodeCompass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ericsson/CodeCompass/merges","archive_url":"https://api.github.com/repos/Ericsson/CodeCompass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ericsson/CodeCompass/downloads","issues_url":"https://api.github.com/repos/Ericsson/CodeCompass/issues{/number}","pulls_url":"https://api.github.com/repos/Ericsson/CodeCompass/pulls{/number}","milestones_url":"https://api.github.com/repos/Ericsson/CodeCompass/milestones{/number}","notifications_url":"https://api.github.com/repos/Ericsson/CodeCompass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ericsson/CodeCompass/labels{/name}","releases_url":"https://api.github.com/repos/Ericsson/CodeCompass/releases{/id}","deployments_url":"https://api.github.com/repos/Ericsson/CodeCompass/deployments","created_at":"2016-03-30T10:12:10Z","updated_at":"2018-07-17T12:41:04Z","pushed_at":"2018-07-19T08:35:42Z","git_url":"git://github.com/Ericsson/CodeCompass.git","ssh_url":"git@github.com:Ericsson/CodeCompass.git","clone_url":"https://github.com/Ericsson/CodeCompass.git","svn_url":"https://github.com/Ericsson/CodeCompass","homepage":null,"size":47521,"stargazers_count":137,"watchers_count":137,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"archived":false,"open_issues_count":58,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":33,"open_issues":58,"watchers":137,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/248"},"html":{"href":"https://github.com/Ericsson/CodeCompass/pull/248"},"issue":{"href":"https://api.github.com/repos/Ericsson/CodeCompass/issues/248"},"comments":{"href":"https://api.github.com/repos/Ericsson/CodeCompass/issues/248/comments"},"review_comments":{"href":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/248/comments"},"review_comment":{"href":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ericsson/CodeCompass/pulls/248/commits"},"statuses":{"href":"https://api.github.com/repos/Ericsson/CodeCompass/statuses/38f43040b5f43d2d83549332216720d4046df129"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"whisperity"}}