{"action":"opened","number":306,"pull_request":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/306","id":31094738,"html_url":"https://github.com/Microsoft/visualfsharp/pull/306","diff_url":"https://github.com/Microsoft/visualfsharp/pull/306.diff","patch_url":"https://github.com/Microsoft/visualfsharp/pull/306.patch","issue_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/306","number":306,"state":"open","locked":false,"title":"Include declaring source directory in #r search path","user":{"login":"latkin","id":5943573,"avatar_url":"https://avatars.githubusercontent.com/u/5943573?v=3","gravatar_id":"","url":"https://api.github.com/users/latkin","html_url":"https://github.com/latkin","followers_url":"https://api.github.com/users/latkin/followers","following_url":"https://api.github.com/users/latkin/following{/other_user}","gists_url":"https://api.github.com/users/latkin/gists{/gist_id}","starred_url":"https://api.github.com/users/latkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latkin/subscriptions","organizations_url":"https://api.github.com/users/latkin/orgs","repos_url":"https://api.github.com/users/latkin/repos","events_url":"https://api.github.com/users/latkin/events{/privacy}","received_events_url":"https://api.github.com/users/latkin/received_events","type":"User","site_admin":false},"body":"fixes #273\r\nfixes #293\r\n\r\nFSI attempts to generate [an up-front closure](https://github.com/Microsoft/visualfsharp/blob/fsharp4/src/fsharp/build.fs#L4806-L4810) of all `#r`'ed references, but unfortunately picks [a single root file](https://github.com/Microsoft/visualfsharp/blob/fsharp4/src/fsharp/build.fs#L4795) as the base for relative resolutions.  [If it can't find the reference via direct file paths, FSI delegates to MSBuild](https://github.com/Microsoft/visualfsharp/blob/fsharp4/src/fsharp/build.fs#L2835-L2847) to do extended search.  If the MSBuild search results in certain errors or warnings, FSI issues an error.\r\n\r\nFor some reason refs like `#r \"foo.dll\"` cause fatal MSBuild error but refs like `#r \"./foo.dll\"` go down [a different codepath](https://github.com/Microsoft/visualfsharp/blob/fsharp4/src/fsharp/ReferenceResolution.fs#L388-L395) and end up not causing a fatal error (even though in both cases the reference is not resolved).  The latter case ends up succeeding in the end because FSI does another traversal through the files later, this time with proper working directory adjustments.\r\n\r\nThe change appears to clear up the problems in both #293 and #273.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/5943573/6631887/850114d0-c8ea-11e4-9b42-25ef72f60a07.png)\r\n\r\n\r\nNeed to add tests still, will update.  This did not break any existing tests.","created_at":"2015-03-13T02:04:31Z","updated_at":"2015-03-13T02:04:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a5024ca4235a4540c01a9e79972e2fe8efd0899","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/306/commits","review_comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/306/comments","review_comment_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/306/comments","statuses_url":"https://api.github.com/repos/Microsoft/visualfsharp/statuses/83e25767f32db3926f76470ec06046afe1309e35","head":{"label":"latkin:fix-293","ref":"fix-293","sha":"83e25767f32db3926f76470ec06046afe1309e35","user":{"login":"latkin","id":5943573,"avatar_url":"https://avatars.githubusercontent.com/u/5943573?v=3","gravatar_id":"","url":"https://api.github.com/users/latkin","html_url":"https://github.com/latkin","followers_url":"https://api.github.com/users/latkin/followers","following_url":"https://api.github.com/users/latkin/following{/other_user}","gists_url":"https://api.github.com/users/latkin/gists{/gist_id}","starred_url":"https://api.github.com/users/latkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latkin/subscriptions","organizations_url":"https://api.github.com/users/latkin/orgs","repos_url":"https://api.github.com/users/latkin/repos","events_url":"https://api.github.com/users/latkin/events{/privacy}","received_events_url":"https://api.github.com/users/latkin/received_events","type":"User","site_admin":false},"repo":{"id":29952040,"name":"visualfsharp","full_name":"latkin/visualfsharp","owner":{"login":"latkin","id":5943573,"avatar_url":"https://avatars.githubusercontent.com/u/5943573?v=3","gravatar_id":"","url":"https://api.github.com/users/latkin","html_url":"https://github.com/latkin","followers_url":"https://api.github.com/users/latkin/followers","following_url":"https://api.github.com/users/latkin/following{/other_user}","gists_url":"https://api.github.com/users/latkin/gists{/gist_id}","starred_url":"https://api.github.com/users/latkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latkin/subscriptions","organizations_url":"https://api.github.com/users/latkin/orgs","repos_url":"https://api.github.com/users/latkin/repos","events_url":"https://api.github.com/users/latkin/events{/privacy}","received_events_url":"https://api.github.com/users/latkin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/latkin/visualfsharp","description":"The Visual F# compiler and tools","fork":true,"url":"https://api.github.com/repos/latkin/visualfsharp","forks_url":"https://api.github.com/repos/latkin/visualfsharp/forks","keys_url":"https://api.github.com/repos/latkin/visualfsharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/latkin/visualfsharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/latkin/visualfsharp/teams","hooks_url":"https://api.github.com/repos/latkin/visualfsharp/hooks","issue_events_url":"https://api.github.com/repos/latkin/visualfsharp/issues/events{/number}","events_url":"https://api.github.com/repos/latkin/visualfsharp/events","assignees_url":"https://api.github.com/repos/latkin/visualfsharp/assignees{/user}","branches_url":"https://api.github.com/repos/latkin/visualfsharp/branches{/branch}","tags_url":"https://api.github.com/repos/latkin/visualfsharp/tags","blobs_url":"https://api.github.com/repos/latkin/visualfsharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/latkin/visualfsharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/latkin/visualfsharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/latkin/visualfsharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/latkin/visualfsharp/statuses/{sha}","languages_url":"https://api.github.com/repos/latkin/visualfsharp/languages","stargazers_url":"https://api.github.com/repos/latkin/visualfsharp/stargazers","contributors_url":"https://api.github.com/repos/latkin/visualfsharp/contributors","subscribers_url":"https://api.github.com/repos/latkin/visualfsharp/subscribers","subscription_url":"https://api.github.com/repos/latkin/visualfsharp/subscription","commits_url":"https://api.github.com/repos/latkin/visualfsharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/latkin/visualfsharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/latkin/visualfsharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/latkin/visualfsharp/issues/comments{/number}","contents_url":"https://api.github.com/repos/latkin/visualfsharp/contents/{+path}","compare_url":"https://api.github.com/repos/latkin/visualfsharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/latkin/visualfsharp/merges","archive_url":"https://api.github.com/repos/latkin/visualfsharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/latkin/visualfsharp/downloads","issues_url":"https://api.github.com/repos/latkin/visualfsharp/issues{/number}","pulls_url":"https://api.github.com/repos/latkin/visualfsharp/pulls{/number}","milestones_url":"https://api.github.com/repos/latkin/visualfsharp/milestones{/number}","notifications_url":"https://api.github.com/repos/latkin/visualfsharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/latkin/visualfsharp/labels{/name}","releases_url":"https://api.github.com/repos/latkin/visualfsharp/releases{/id}","created_at":"2015-01-28T05:21:31Z","updated_at":"2015-03-11T21:05:37Z","pushed_at":"2015-03-13T01:29:27Z","git_url":"git://github.com/latkin/visualfsharp.git","ssh_url":"git@github.com:latkin/visualfsharp.git","clone_url":"https://github.com/latkin/visualfsharp.git","svn_url":"https://github.com/latkin/visualfsharp","homepage":null,"size":48959,"stargazers_count":0,"watchers_count":0,"language":"F#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"fsharp4"}},"base":{"label":"Microsoft:fsharp4","ref":"fsharp4","sha":"220c17d465dcf36acac6008ae9d4df9bcc632527","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":29048891,"name":"visualfsharp","full_name":"Microsoft/visualfsharp","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/visualfsharp","description":"The Visual F# compiler and tools","fork":false,"url":"https://api.github.com/repos/Microsoft/visualfsharp","forks_url":"https://api.github.com/repos/Microsoft/visualfsharp/forks","keys_url":"https://api.github.com/repos/Microsoft/visualfsharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/visualfsharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/visualfsharp/teams","hooks_url":"https://api.github.com/repos/Microsoft/visualfsharp/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/visualfsharp/events","assignees_url":"https://api.github.com/repos/Microsoft/visualfsharp/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/visualfsharp/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/visualfsharp/tags","blobs_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/visualfsharp/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/visualfsharp/languages","stargazers_url":"https://api.github.com/repos/Microsoft/visualfsharp/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/visualfsharp/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/visualfsharp/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/visualfsharp/subscription","commits_url":"https://api.github.com/repos/Microsoft/visualfsharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/visualfsharp/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/visualfsharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/visualfsharp/merges","archive_url":"https://api.github.com/repos/Microsoft/visualfsharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/visualfsharp/downloads","issues_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/visualfsharp/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/visualfsharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/visualfsharp/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/visualfsharp/releases{/id}","created_at":"2015-01-10T05:58:43Z","updated_at":"2015-03-11T03:57:15Z","pushed_at":"2015-03-10T19:30:11Z","git_url":"git://github.com/Microsoft/visualfsharp.git","ssh_url":"git@github.com:Microsoft/visualfsharp.git","clone_url":"https://github.com/Microsoft/visualfsharp.git","svn_url":"https://github.com/Microsoft/visualfsharp","homepage":null,"size":51661,"stargazers_count":331,"watchers_count":331,"language":"F#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":113,"forks":48,"open_issues":113,"watchers":331,"default_branch":"fsharp4"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/306"},"html":{"href":"https://github.com/Microsoft/visualfsharp/pull/306"},"issue":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/issues/306"},"comments":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/issues/306/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/306/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/306/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/statuses/83e25767f32db3926f76470ec06046afe1309e35"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":8,"deletions":2,"changed_files":1}}