Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit38e8642

Browse files
committed
Fixfsharp#172 - On Mono #I paths don't work for assembly references
1 parent3ac64e3 commit38e8642

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/fsharp/fsc.fs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ let AdjustForScriptCompile(tcConfigB:TcConfigBuilder,commandLineSourceFiles,lexR
171171
letAppendClosureInformation(filename)=
172172
if IsScript filenamethen
173173
letclosure= LoadClosure.ComputeClosureOfSourceFiles(tcConfig,[filename,rangeStartup],CodeContext.Compilation,lexResourceManager=lexResourceManager,useDefaultScriptingReferences=false)
174-
letreferences= closure.References|> List.map snd|> List.concat|> List.map(fun r->r.originalReference)|> List.filter(fun r->r.Range<>range0)
175-
references|> List.iter(fun r-> tcConfigB.AddReferencedAssemblyByPath(r.Range,r.Text))
174+
// Record the references from the analysis of the script. The full resolutions are recorded as the corresponding #I paths used to resolve them
175+
// are local to the scripts and not added to the tcConfigB (they are added to localized clones of the tcConfigB).
176+
letreferences= closure.References|> List.map snd|> List.concat|> List.filter(fun r->r.originalReference.Range<>range0)
177+
references|> List.iter(fun r-> tcConfigB.AddReferencedAssemblyByPath(r.originalReference.Range,r.resolvedPath))
176178
closure.NoWarns|> List.map(fun(n,ms)->ms|>List.map(fun m->m,n))|> List.concat|> List.iter tcConfigB.TurnWarningOff
177179
closure.SourceFiles|> List.map fst|> List.iter AddIfNotPresent
178180
closure.RootWarnings|> List.iter warnSink

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp