{"action":"created","issue":{"url":"https://api.github.com/repos/scala/pickling/issues/340","labels_url":"https://api.github.com/repos/scala/pickling/issues/340/labels{/name}","comments_url":"https://api.github.com/repos/scala/pickling/issues/340/comments","events_url":"https://api.github.com/repos/scala/pickling/issues/340/events","html_url":"https://github.com/scala/pickling/pull/340","id":88557145,"number":340,"title":"Macro Hygiene + Locking Hygiene","user":{"login":"jsuereth","id":29006,"avatar_url":"https://avatars.githubusercontent.com/u/29006?v=3","gravatar_id":"","url":"https://api.github.com/users/jsuereth","html_url":"https://github.com/jsuereth","followers_url":"https://api.github.com/users/jsuereth/followers","following_url":"https://api.github.com/users/jsuereth/following{/other_user}","gists_url":"https://api.github.com/users/jsuereth/gists{/gist_id}","starred_url":"https://api.github.com/users/jsuereth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsuereth/subscriptions","organizations_url":"https://api.github.com/users/jsuereth/orgs","repos_url":"https://api.github.com/users/jsuereth/repos","events_url":"https://api.github.com/users/jsuereth/events{/privacy}","received_events_url":"https://api.github.com/users/jsuereth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scala/pickling/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-15T22:28:43Z","updated_at":"2015-06-21T23:50:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scala/pickling/pulls/340","html_url":"https://github.com/scala/pickling/pull/340","diff_url":"https://github.com/scala/pickling/pull/340.diff","patch_url":"https://github.com/scala/pickling/pull/340.patch"},"body":"This PR does two things:\r\n\r\n1. We migrate all instances of GRL locks into dynamic sections of pickling.  ANything which *generates* a runtime pickler is locked.   All runtime picklers which use reflection lock in their pickle/unpickle methods.\r\n2. We fully qualify ALL types in the macro in `_root_.` which means we can remove the imports from the generated macro trees.\r\n\r\nShould take care to review, but all tests pass and I tried an experiment with overriding sbt-server using this code, but not sure I fully refreshed the generated macro code to be clear of GRL locks.\r\n\r\n\r\nReview by> @eed3si9n @phaller "},"comment":{"url":"https://api.github.com/repos/scala/pickling/issues/comments/113969564","html_url":"https://github.com/scala/pickling/pull/340#issuecomment-113969564","issue_url":"https://api.github.com/repos/scala/pickling/issues/340","id":113969564,"user":{"login":"retronym","id":65551,"avatar_url":"https://avatars.githubusercontent.com/u/65551?v=3","gravatar_id":"","url":"https://api.github.com/users/retronym","html_url":"https://github.com/retronym","followers_url":"https://api.github.com/users/retronym/followers","following_url":"https://api.github.com/users/retronym/following{/other_user}","gists_url":"https://api.github.com/users/retronym/gists{/gist_id}","starred_url":"https://api.github.com/users/retronym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retronym/subscriptions","organizations_url":"https://api.github.com/users/retronym/orgs","repos_url":"https://api.github.com/users/retronym/repos","events_url":"https://api.github.com/users/retronym/events{/privacy}","received_events_url":"https://api.github.com/users/retronym/received_events","type":"User","site_admin":false},"created_at":"2015-06-21T23:50:43Z","updated_at":"2015-06-21T23:50:43Z","body":"LGTM.\r\n\r\nFTR, an alternative to fully qualifying names is to splice symbols, \r\n\r\n```scala\r\nval FastTypeTagClass = typeOf[FastTypeTag[_]].typeSymbol // or just symbolOf[...] in 2.11\r\nval IntTpe = typeOf[Int]\r\n...\r\n\r\nq\"_root_.scala.pickling.FastTypeTag[_root_.scala.Int]\" // Usings FQNs\r\nq\"new $FastTypeTag[$IntTpe]]\" // splicing symbols\r\n```"}}