{"action":"created","issue":{"url":"https://api.github.com/repos/minted/php-protobuf/issues/1","repository_url":"https://api.github.com/repos/minted/php-protobuf","labels_url":"https://api.github.com/repos/minted/php-protobuf/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/minted/php-protobuf/issues/1/comments","events_url":"https://api.github.com/repos/minted/php-protobuf/issues/1/events","html_url":"https://github.com/minted/php-protobuf/pull/1","id":134461361,"number":1,"title":"Edit the php protobuf compiler to compile dependencies in their own directories and have require_once statements point to those compiled files","user":{"login":"gabriella-minted","id":5943930,"avatar_url":"https://avatars.githubusercontent.com/u/5943930?v=3","gravatar_id":"","url":"https://api.github.com/users/gabriella-minted","html_url":"https://github.com/gabriella-minted","followers_url":"https://api.github.com/users/gabriella-minted/followers","following_url":"https://api.github.com/users/gabriella-minted/following{/other_user}","gists_url":"https://api.github.com/users/gabriella-minted/gists{/gist_id}","starred_url":"https://api.github.com/users/gabriella-minted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabriella-minted/subscriptions","organizations_url":"https://api.github.com/users/gabriella-minted/orgs","repos_url":"https://api.github.com/users/gabriella-minted/repos","events_url":"https://api.github.com/users/gabriella-minted/events{/privacy}","received_events_url":"https://api.github.com/users/gabriella-minted/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-18T02:13:41Z","updated_at":"2016-02-18T02:14:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/minted/php-protobuf/pulls/1","html_url":"https://github.com/minted/php-protobuf/pull/1","diff_url":"https://github.com/minted/php-protobuf/pull/1.diff","patch_url":"https://github.com/minted/php-protobuf/pull/1.patch"},"body":"http://jira.minted.com/browse/CM-9882\r\n\r\nUse case: when I compile a proto file, the file itself and any imported proto files should all be compiled in the folder they're currently in, instead of the current working directory of the script.\r\n\r\nChanges made:\r\n* added a new input option: `--compile-in-place`, that takes the directory of the proto source file and uses that as the path for the generated/compiled file\r\n* a proto file is associated with its compiled filename\r\n* when an `import \"some_file.proto\"` statement is encountered by the compiler, it will use the compiled file path in the generated php `require_once \"...\"` statement\r\n\r\nTesting done locally:\r\n* created folders in `drupal/`\r\n  * `drupal/minted-proto` -- contains the files from https://github.com/minted/minted_proto/tree/master/minted_proto\r\n  * `drupal/vote-proto` -- contains [response.proto](https://github.com/minted/minted/blob/master/src/py/minted/api/vote/private_proto/response.proto)\r\n* from the `drupal/` directory, I ran the following to compile response.proto\r\n  * `php $PHP_COMPILE_SCRIPT --compile-in-place vote-proto/response.proto`\r\n* VERIFIED: the compiled version of response.proto was in `vote-proto/`\r\n* VERIFIED: the `require_once` statements in the compiled version of response.proto pointed at `minted-proto/`\r\n* VERIFIED: the compiled versions of the `minted-proto/` files were placed in the same directory as their source files\r\n\r\nNote: these manual testing steps will eventually be added to the deploy process (with some renaming/reconfiguring)\r\n\r\nStill TODO:\r\n* make a test php script that tries to `require_once` the generated php file for response.proto"},"comment":{"url":"https://api.github.com/repos/minted/php-protobuf/issues/comments/185510325","html_url":"https://github.com/minted/php-protobuf/pull/1#issuecomment-185510325","issue_url":"https://api.github.com/repos/minted/php-protobuf/issues/1","id":185510325,"user":{"login":"gabriella-minted","id":5943930,"avatar_url":"https://avatars.githubusercontent.com/u/5943930?v=3","gravatar_id":"","url":"https://api.github.com/users/gabriella-minted","html_url":"https://github.com/gabriella-minted","followers_url":"https://api.github.com/users/gabriella-minted/followers","following_url":"https://api.github.com/users/gabriella-minted/following{/other_user}","gists_url":"https://api.github.com/users/gabriella-minted/gists{/gist_id}","starred_url":"https://api.github.com/users/gabriella-minted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabriella-minted/subscriptions","organizations_url":"https://api.github.com/users/gabriella-minted/orgs","repos_url":"https://api.github.com/users/gabriella-minted/repos","events_url":"https://api.github.com/users/gabriella-minted/events{/privacy}","received_events_url":"https://api.github.com/users/gabriella-minted/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T02:14:12Z","updated_at":"2016-02-18T02:14:12Z","body":"@wtanakaminted @patrick-minted @TimothyWorsley-minted -- would you be able to take a look?"}}