{"action":"created","issue":{"url":"https://api.github.com/repos/cvogt/cbt/issues/266","repository_url":"https://api.github.com/repos/cvogt/cbt","labels_url":"https://api.github.com/repos/cvogt/cbt/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/cvogt/cbt/issues/266/comments","events_url":"https://api.github.com/repos/cvogt/cbt/issues/266/events","html_url":"https://github.com/cvogt/cbt/pull/266","id":180988951,"number":266,"title":"System properties","user":{"login":"rockjam","id":1951244,"avatar_url":"https://avatars.githubusercontent.com/u/1951244?v=3","gravatar_id":"","url":"https://api.github.com/users/rockjam","html_url":"https://github.com/rockjam","followers_url":"https://api.github.com/users/rockjam/followers","following_url":"https://api.github.com/users/rockjam/following{/other_user}","gists_url":"https://api.github.com/users/rockjam/gists{/gist_id}","starred_url":"https://api.github.com/users/rockjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockjam/subscriptions","organizations_url":"https://api.github.com/users/rockjam/orgs","repos_url":"https://api.github.com/users/rockjam/repos","events_url":"https://api.github.com/users/rockjam/events{/privacy}","received_events_url":"https://api.github.com/users/rockjam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-04T19:56:07Z","updated_at":"2016-10-08T18:56:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cvogt/cbt/pulls/266","html_url":"https://github.com/cvogt/cbt/pull/266","diff_url":"https://github.com/cvogt/cbt/pull/266.diff","patch_url":"https://github.com/cvogt/cbt/pull/266.patch"},"body":"This one is work in progress. I'm not sure if it is right way to pass system properties to build tasks and user's code. In https://github.com/rockjam/cbt/blob/system-properties/examples/system-properties/README.md I described how it works in current implementation."},"comment":{"url":"https://api.github.com/repos/cvogt/cbt/issues/comments/252441834","html_url":"https://github.com/cvogt/cbt/pull/266#issuecomment-252441834","issue_url":"https://api.github.com/repos/cvogt/cbt/issues/266","id":252441834,"user":{"login":"rockjam","id":1951244,"avatar_url":"https://avatars.githubusercontent.com/u/1951244?v=3","gravatar_id":"","url":"https://api.github.com/users/rockjam","html_url":"https://github.com/rockjam","followers_url":"https://api.github.com/users/rockjam/followers","following_url":"https://api.github.com/users/rockjam/following{/other_user}","gists_url":"https://api.github.com/users/rockjam/gists{/gist_id}","starred_url":"https://api.github.com/users/rockjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockjam/subscriptions","organizations_url":"https://api.github.com/users/rockjam/orgs","repos_url":"https://api.github.com/users/rockjam/repos","events_url":"https://api.github.com/users/rockjam/events{/privacy}","received_events_url":"https://api.github.com/users/rockjam/received_events","type":"User","site_admin":false},"created_at":"2016-10-08T18:56:18Z","updated_at":"2016-10-08T18:56:18Z","body":"@cvogt\r\nSystem you described seems difficult to me. There are some things I agree, but want to make it simpler somehow, and I have some suggestions.\r\n\r\n1. I agree to separate cbt's properties from system properties, so we could do:\r\n\r\n  ```\r\n  cbt -log=all -debug=true repl -Dscala.color=true\r\n  ```\r\n  where `-log` and `-debug` flags are cbt's, and `-Dscala.color=true` is global flag passed to JVM\r\n\r\n2. Don't let people use system properties with nailgun at all.\r\n  We already have warnings in cbt, saying: \"use cbt direct instead\". We could do the same in cases when user need to pass system properties.\r\n  So, allow only:\r\n  ```\r\n  cbt direct repl -Dscala.color=true\r\n  ```\r\n  but not:\r\n  ```\r\n  cbt repl -Dscala.color=true\r\n  ```\r\n3. Don't let people to pass system properties to task itself.\r\n  > Also, we should probably only allow -X and -D to be provided BEFORE task name, so\r\n  > ```cbt <allowed here> <task name> <but not here>```\r\n  > so that the task could itself take -X or -D arguments, e.g. if it is the Scala repl, etc.\r\n  \r\n  Want to find out, if we are on the same page. AFAIK, we just pass system properties globally, to instance of JVM that is running current task. System properties will be the same inside cbt's task and inside the thing that task may run. For example, when we execute `cbt run -Duser.timezone=UTC`, we'll get same value of `System.getProperty(\"user.timezone\")` inside `run` task and inside `Main` class. This is how it works.\r\n  \r\n  I also think that we could avoid passing system properties to tasks in favour args(#172) of environment variables."}}
{"actor":{"display_login":"rockjam"}}