GitHub PullRequestEvent at 2014-07-28 21:11:28
Repository: libsass
Actor: akhleung
Payload: {"action":"closed","number":451,"pull_request":{"url":"https://api.github.com/repos/sass/libsass/pulls/451","id":18928920,"html_url":"https://github.com/sass/libsass/pull/451","diff_url":"https://github.com/sass/libsass/pull/451.diff","patch_url":"https://github.com/sass/libsass/pull/451.patch","issue_url":"https://api.github.com/repos/sass/libsass/issues/451","number":451,"state":"closed","title":"Problem with relative path on windows and source maps","user":{"login":"mgreter","id":282293,"avatar_url":"https://avatars.githubusercontent.com/u/282293?","gravatar_id":"2b5af3ebe442f76b88208f63a39052b3","url":"https://api.github.com/users/mgreter","html_url":"https://github.com/mgreter","followers_url":"https://api.github.com/users/mgreter/followers","following_url":"https://api.github.com/users/mgreter/following{/other_user}","gists_url":"https://api.github.com/users/mgreter/gists{/gist_id}","starred_url":"https://api.github.com/users/mgreter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgreter/subscriptions","organizations_url":"https://api.github.com/users/mgreter/orgs","repos_url":"https://api.github.com/users/mgreter/repos","events_url":"https://api.github.com/users/mgreter/events{/privacy}","received_events_url":"https://api.github.com/users/mgreter/received_events","type":"User","site_admin":false},"body":"This is related to #441 and #242\r\n\r\nSource Maps currently contain invalid paths:\r\n```\r\n\"sources\": [\"../../../../../D:\\github\\webmerge\\example\\scss\\_QfHU8qB_K.scss\" ]\r\n```\r\n\r\nI tracked down the cultprit (as did #441) to be in `resolve_relative_path`. But IMO the underlying problem is burried deeper in the code at [context.cpp#L288](https://github.com/mgreter/libsass/blob/source_maps_win_rel_paths/context.cpp#L288). `resolve_relative_path` is called with `real_path` from `resolve_and_load` (uri), `source_map_file` (base) and `cwd` (cwd) ([file.cpp#L85](https://github.com/mgreter/libsass/blob/source_maps_win_rel_paths/file.cpp#L85)):\r\n```\r\n uri: D:\\github\\webmerge\\example\\scss\\4CTIC43Arz.scss\r\n base: test.map\r\n cwd: D:/github/webmerge/example/scss/\r\n absolute_uri: D:\\github\\webmerge\\example\\scss\\4CTIC43Arz.scss\r\n absolute_base: D:/github/webmerge/example/scss/test.map\r\n => ../../../../../D:\\github\\webmerge\\example\\scss\\4CTIC43Arz.scss\r\n```\r\n\r\nI also have done some additional tests for when `resolve_relative_path` is called with a base on a different drive (after applying this patch). It will then return a full windows path with forward slashes (which is acceptable IMO).\r\n```\r\nD:/github/webmerge/example/scss/4CTIC43Arz.scss\r\n```\r\n\r\nI don't know why #441 wants to actually convert paths on windows to lowercase. I think this would lead to all paths in source maps to be in lowercase. Which would introduce problems if these files would be deployed to linux or any other case sensitive fs.\r\n\r\nIt also fixes #242 since it should now always produce forward slashes, which do not need to be escaped. Although [source_map.cpp#L14](https://github.com/mgreter/libsass/blob/source_maps_win_rel_paths/source_map.cpp#L14) definitely should use some proper escaping.","created_at":"2014-07-26T05:46:52Z","updated_at":"2014-07-28T21:11:28Z","closed_at":"2014-07-28T21:11:28Z","merged_at":"2014-07-28T21:11:28Z","merge_commit_sha":"93dde13dec2603228eddc5b5487ba9888665ff03","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sass/libsass/pulls/451/commits","review_comments_url":"https://api.github.com/repos/sass/libsass/pulls/451/comments","review_comment_url":"https://api.github.com/repos/sass/libsass/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sass/libsass/issues/451/comments","statuses_url":"https://api.github.com/repos/sass/libsass/statuses/1298156c4a7935a535357eaaa35e3172e62b6d17","head":{"label":"mgreter:source_maps_win_rel_paths","ref":"source_maps_win_rel_paths","sha":"1298156c4a7935a535357eaaa35e3172e62b6d17","user":{"login":"mgreter","id":282293,"avatar_url":"https://avatars.githubusercontent.com/u/282293?","gravatar_id":"2b5af3ebe442f76b88208f63a39052b3","url":"https://api.github.com/users/mgreter","html_url":"https://github.com/mgreter","followers_url":"https://api.github.com/users/mgreter/followers","following_url":"https://api.github.com/users/mgreter/following{/other_user}","gists_url":"https://api.github.com/users/mgreter/gists{/gist_id}","starred_url":"https://api.github.com/users/mgreter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgreter/subscriptions","organizations_url":"https://api.github.com/users/mgreter/orgs","repos_url":"https://api.github.com/users/mgreter/repos","events_url":"https://api.github.com/users/mgreter/events{/privacy}","received_events_url":"https://api.github.com/users/mgreter/received_events","type":"User","site_admin":false},"repo":{"id":13783687,"name":"libsass","full_name":"mgreter/libsass","owner":{"login":"mgreter","id":282293,"avatar_url":"https://avatars.githubusercontent.com/u/282293?","gravatar_id":"2b5af3ebe442f76b88208f63a39052b3","url":"https://api.github.com/users/mgreter","html_url":"https://github.com/mgreter","followers_url":"https://api.github.com/users/mgreter/followers","following_url":"https://api.github.com/users/mgreter/following{/other_user}","gists_url":"https://api.github.com/users/mgreter/gists{/gist_id}","starred_url":"https://api.github.com/users/mgreter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgreter/subscriptions","organizations_url":"https://api.github.com/users/mgreter/orgs","repos_url":"https://api.github.com/users/mgreter/repos","events_url":"https://api.github.com/users/mgreter/events{/privacy}","received_events_url":"https://api.github.com/users/mgreter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mgreter/libsass","description":"A C implementation of a Sass compiler","fork":true,"url":"https://api.github.com/repos/mgreter/libsass","forks_url":"https://api.github.com/repos/mgreter/libsass/forks","keys_url":"https://api.github.com/repos/mgreter/libsass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mgreter/libsass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mgreter/libsass/teams","hooks_url":"https://api.github.com/repos/mgreter/libsass/hooks","issue_events_url":"https://api.github.com/repos/mgreter/libsass/issues/events{/number}","events_url":"https://api.github.com/repos/mgreter/libsass/events","assignees_url":"https://api.github.com/repos/mgreter/libsass/assignees{/user}","branches_url":"https://api.github.com/repos/mgreter/libsass/branches{/branch}","tags_url":"https://api.github.com/repos/mgreter/libsass/tags","blobs_url":"https://api.github.com/repos/mgreter/libsass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mgreter/libsass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mgreter/libsass/git/refs{/sha}","trees_url":"https://api.github.com/repos/mgreter/libsass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mgreter/libsass/statuses/{sha}","languages_url":"https://api.github.com/repos/mgreter/libsass/languages","stargazers_url":"https://api.github.com/repos/mgreter/libsass/stargazers","contributors_url":"https://api.github.com/repos/mgreter/libsass/contributors","subscribers_url":"https://api.github.com/repos/mgreter/libsass/subscribers","subscription_url":"https://api.github.com/repos/mgreter/libsass/subscription","commits_url":"https://api.github.com/repos/mgreter/libsass/commits{/sha}","git_commits_url":"https://api.github.com/repos/mgreter/libsass/git/commits{/sha}","comments_url":"https://api.github.com/repos/mgreter/libsass/comments{/number}","issue_comment_url":"https://api.github.com/repos/mgreter/libsass/issues/comments/{number}","contents_url":"https://api.github.com/repos/mgreter/libsass/contents/{+path}","compare_url":"https://api.github.com/repos/mgreter/libsass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mgreter/libsass/merges","archive_url":"https://api.github.com/repos/mgreter/libsass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mgreter/libsass/downloads","issues_url":"https://api.github.com/repos/mgreter/libsass/issues{/number}","pulls_url":"https://api.github.com/repos/mgreter/libsass/pulls{/number}","milestones_url":"https://api.github.com/repos/mgreter/libsass/milestones{/number}","notifications_url":"https://api.github.com/repos/mgreter/libsass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mgreter/libsass/labels{/name}","releases_url":"https://api.github.com/repos/mgreter/libsass/releases{/id}","created_at":"2013-10-22T19:33:21Z","updated_at":"2014-07-04T14:34:22Z","pushed_at":"2014-07-26T06:11:33Z","git_url":"git://github.com/mgreter/libsass.git","ssh_url":"git@github.com:mgreter/libsass.git","clone_url":"https://github.com/mgreter/libsass.git","svn_url":"https://github.com/mgreter/libsass","homepage":"","size":5929,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"sass:master","ref":"master","sha":"fca1f75a14fe5336c7b1a4b38c69bda7fece714f","user":{"login":"sass","id":317889,"avatar_url":"https://avatars.githubusercontent.com/u/317889?","gravatar_id":"164c1121724d6f7ce3ff4b711e289e18","url":"https://api.github.com/users/sass","html_url":"https://github.com/sass","followers_url":"https://api.github.com/users/sass/followers","following_url":"https://api.github.com/users/sass/following{/other_user}","gists_url":"https://api.github.com/users/sass/gists{/gist_id}","starred_url":"https://api.github.com/users/sass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sass/subscriptions","organizations_url":"https://api.github.com/users/sass/orgs","repos_url":"https://api.github.com/users/sass/repos","events_url":"https://api.github.com/users/sass/events{/privacy}","received_events_url":"https://api.github.com/users/sass/received_events","type":"Organization","site_admin":false},"repo":{"id":3319769,"name":"libsass","full_name":"sass/libsass","owner":{"login":"sass","id":317889,"avatar_url":"https://avatars.githubusercontent.com/u/317889?","gravatar_id":"164c1121724d6f7ce3ff4b711e289e18","url":"https://api.github.com/users/sass","html_url":"https://github.com/sass","followers_url":"https://api.github.com/users/sass/followers","following_url":"https://api.github.com/users/sass/following{/other_user}","gists_url":"https://api.github.com/users/sass/gists{/gist_id}","starred_url":"https://api.github.com/users/sass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sass/subscriptions","organizations_url":"https://api.github.com/users/sass/orgs","repos_url":"https://api.github.com/users/sass/repos","events_url":"https://api.github.com/users/sass/events{/privacy}","received_events_url":"https://api.github.com/users/sass/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sass/libsass","description":"A C/C++ implementation of a Sass compiler","fork":false,"url":"https://api.github.com/repos/sass/libsass","forks_url":"https://api.github.com/repos/sass/libsass/forks","keys_url":"https://api.github.com/repos/sass/libsass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sass/libsass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sass/libsass/teams","hooks_url":"https://api.github.com/repos/sass/libsass/hooks","issue_events_url":"https://api.github.com/repos/sass/libsass/issues/events{/number}","events_url":"https://api.github.com/repos/sass/libsass/events","assignees_url":"https://api.github.com/repos/sass/libsass/assignees{/user}","branches_url":"https://api.github.com/repos/sass/libsass/branches{/branch}","tags_url":"https://api.github.com/repos/sass/libsass/tags","blobs_url":"https://api.github.com/repos/sass/libsass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sass/libsass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sass/libsass/git/refs{/sha}","trees_url":"https://api.github.com/repos/sass/libsass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sass/libsass/statuses/{sha}","languages_url":"https://api.github.com/repos/sass/libsass/languages","stargazers_url":"https://api.github.com/repos/sass/libsass/stargazers","contributors_url":"https://api.github.com/repos/sass/libsass/contributors","subscribers_url":"https://api.github.com/repos/sass/libsass/subscribers","subscription_url":"https://api.github.com/repos/sass/libsass/subscription","commits_url":"https://api.github.com/repos/sass/libsass/commits{/sha}","git_commits_url":"https://api.github.com/repos/sass/libsass/git/commits{/sha}","comments_url":"https://api.github.com/repos/sass/libsass/comments{/number}","issue_comment_url":"https://api.github.com/repos/sass/libsass/issues/comments/{number}","contents_url":"https://api.github.com/repos/sass/libsass/contents/{+path}","compare_url":"https://api.github.com/repos/sass/libsass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sass/libsass/merges","archive_url":"https://api.github.com/repos/sass/libsass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sass/libsass/downloads","issues_url":"https://api.github.com/repos/sass/libsass/issues{/number}","pulls_url":"https://api.github.com/repos/sass/libsass/pulls{/number}","milestones_url":"https://api.github.com/repos/sass/libsass/milestones{/number}","notifications_url":"https://api.github.com/repos/sass/libsass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sass/libsass/labels{/name}","releases_url":"https://api.github.com/repos/sass/libsass/releases{/id}","created_at":"2012-01-31T22:59:07Z","updated_at":"2014-07-27T20:19:48Z","pushed_at":"2014-07-28T21:11:28Z","git_url":"git://github.com/sass/libsass.git","ssh_url":"git@github.com:sass/libsass.git","clone_url":"https://github.com/sass/libsass.git","svn_url":"https://github.com/sass/libsass","homepage":"http://libsass.org","size":10081,"stargazers_count":1725,"watchers_count":1725,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":144,"mirror_url":null,"open_issues_count":102,"forks":144,"open_issues":102,"watchers":1725,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sass/libsass/pulls/451"},"html":{"href":"https://github.com/sass/libsass/pull/451"},"issue":{"href":"https://api.github.com/repos/sass/libsass/issues/451"},"comments":{"href":"https://api.github.com/repos/sass/libsass/issues/451/comments"},"review_comments":{"href":"https://api.github.com/repos/sass/libsass/pulls/451/comments"},"review_comment":{"href":"https://api.github.com/repos/sass/libsass/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sass/libsass/pulls/451/commits"},"statuses":{"href":"https://api.github.com/repos/sass/libsass/statuses/1298156c4a7935a535357eaaa35e3172e62b6d17"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"akhleung","id":704085,"avatar_url":"https://avatars.githubusercontent.com/u/704085?","gravatar_id":"4ebee0a74e0b86f21bd49df64a626afb","url":"https://api.github.com/users/akhleung","html_url":"https://github.com/akhleung","followers_url":"https://api.github.com/users/akhleung/followers","following_url":"https://api.github.com/users/akhleung/following{/other_user}","gists_url":"https://api.github.com/users/akhleung/gists{/gist_id}","starred_url":"https://api.github.com/users/akhleung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhleung/subscriptions","organizations_url":"https://api.github.com/users/akhleung/orgs","repos_url":"https://api.github.com/users/akhleung/repos","events_url":"https://api.github.com/users/akhleung/events{/privacy}","received_events_url":"https://api.github.com/users/akhleung/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":2,"additions":29,"deletions":8,"changed_files":2}}