[Pkg-cli-apps-commits] [fsharp] 02/09: Fix #172 - On Mono #I paths don't work for assembly references

Christopher Halse Rogers raof-guest at moszumanska.debian.org
Mon Dec 16 04:01:53 UTC 2013


This is an automated email from the git hooks/post-receive script.

raof-guest pushed a commit to branch master
in repository fsharp.

commit 38e86427967b5a9f6129e2bb923073d4fdb45123
Author: Don Syme <donsyme at fastmail.fm>
Date:   Sat Nov 9 15:30:51 2013 +0000

    Fix #172 - On Mono #I paths don't work for assembly references
---
 src/fsharp/fsc.fs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/fsharp/fsc.fs b/src/fsharp/fsc.fs
index eecb40e..e52bc18 100755
--- a/src/fsharp/fsc.fs
+++ b/src/fsharp/fsc.fs
@@ -171,8 +171,10 @@ let AdjustForScriptCompile(tcConfigB:TcConfigBuilder,commandLineSourceFiles,lexR
     let AppendClosureInformation(filename) =
         if IsScript filename then 
             let closure = LoadClosure.ComputeClosureOfSourceFiles(tcConfig,[filename,rangeStartup],CodeContext.Compilation,lexResourceManager=lexResourceManager,useDefaultScriptingReferences=false)
-            let references = closure.References |> List.map snd |> List.concat |> List.map (fun r->r.originalReference) |> List.filter (fun r->r.Range<>range0)
-            references |> List.iter (fun r-> tcConfigB.AddReferencedAssemblyByPath(r.Range,r.Text))
+            // Record the references from the analysis of the script. The full resolutions are recorded as the corresponding #I paths used to resolve them
+            // are local to the scripts and not added to the tcConfigB (they are added to localized clones of the tcConfigB).
+            let references = closure.References |> List.map snd |> List.concat |> List.filter (fun r->r.originalReference.Range<>range0)
+            references |> List.iter (fun r-> tcConfigB.AddReferencedAssemblyByPath(r.originalReference.Range,r.resolvedPath))
             closure.NoWarns |> List.map(fun (n,ms)->ms|>List.map(fun m->m,n)) |> List.concat |> List.iter tcConfigB.TurnWarningOff
             closure.SourceFiles |> List.map fst |> List.iter AddIfNotPresent
             closure.RootWarnings |> List.iter warnSink

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-apps/packages/fsharp.git



More information about the Pkg-cli-apps-commits mailing list