Skip to content

Commit 2058835

Browse files
committed
Make output debug-only
1 parent 4251015 commit 2058835

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

fcs/fcs-fable/service_shim.fs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,12 @@ type InteractiveChecker internal (tcConfig, tcGlobals, tcImports, tcInitialState
226226

227227
// search over all imported CCUs for each cached type
228228
let ccuHasType (ccu: CcuThunk) (nsname: string list) (tname: string) =
229-
match (Some ccu.Contents, nsname) ||> List.fold (fun entityOpt n ->
229+
let findEntity (entityOpt: Entity option) n =
230230
match entityOpt with
231231
| None -> None
232-
| Some entity -> entity.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryFind n) with
232+
| Some entity -> entity.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryFind n
233+
let entityOpt = (Some ccu.Contents, nsname) ||> List.fold findEntity
234+
match entityOpt with
233235
| Some ns ->
234236
match Map.tryFind tname ns.ModuleOrNamespaceType.TypesByMangledName with
235237
| Some _ -> true
@@ -242,7 +244,9 @@ type InteractiveChecker internal (tcConfig, tcGlobals, tcImports, tcInitialState
242244
match search with
243245
| Some x -> Some x.FSharpViewOfMetadata
244246
| None ->
247+
#if DEBUG
245248
printfn "Cannot find type %s.%s" (String.concat "." nsname) typeName
249+
#endif
246250
None
247251

248252
let tcGlobals = TcGlobals (

src/fsharp/CompileOps.fs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5388,11 +5388,7 @@ type LoadClosure =
53885388

53895389
// cut-down version of TcConfig
53905390
type TcConfig (optimize: bool, defines: string list) =
5391-
#if COMPILER_SERVICE_ASSUMES_DOTNETCORE_COMPILATION
5392-
member x.primaryAssembly = PrimaryAssembly.System_Runtime
5393-
#else
5394-
member x.primaryAssembly = PrimaryAssembly.Mscorlib
5395-
#endif
5391+
member x.primaryAssembly = PrimaryAssembly.NetStandard
53965392
member x.implicitIncludeDir = ""
53975393
member x.compilingFslib = false
53985394
member x.isInteractive = false

0 commit comments

Comments
 (0)