File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 11module Fable.Compiler.Platform
22
3- let __dirname = " ."
4-
53#if DOTNET_ FILE_ SYSTEM && ! FABLE_ COMPILER
64
75open System.IO
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ let parseProjectFile projectPath =
112112 |> Seq.toArray
113113
114114 // replace some variables
115- let projectText = projectText.Replace( @" $(MSBuildProjectDirectory)" , __ dirname )
115+ let projectText = projectText.Replace( @" $(MSBuildProjectDirectory)" , " . " )
116116 let m = Regex.Match( projectText, @" <FSharpSourcesRoot[^>]*>([^<]*)<\/FSharpSourcesRoot[^>]*>" )
117117 let sourcesRoot = if m.Success then m.Groups.[ 1 ]. Value.Replace( " \\ " , " /" ) else " "
118118 let projectText = projectText.Replace( @" $(FSharpSourcesRoot)" , sourcesRoot)
Original file line number Diff line number Diff line change @@ -552,6 +552,11 @@ let TryGetInfoForNonLocalEntityRef env (nleref: NonLocalEntityRef) =
552552let GetInfoForNonLocalVal cenv env ( vref : ValRef ) =
553553 if vref.IsDispatchSlot then
554554 UnknownValInfo
555+ #if FABLE_ COMPILER
556+ // no inlining for FSharp.Core
557+ elif vref.ToString() .Contains( " FSharp.Core." ) then
558+ UnknownValInfo
559+ #endif
555560 // REVIEW: optionally turn x-module on/off on per-module basis or
556561 elif cenv.settings.crossModuleOpt () || vref.MustInline then
557562 match TryGetInfoForNonLocalEntityRef env vref.nlr.EnclosingEntity.nlr with
@@ -2425,7 +2430,12 @@ and OptimizeVal cenv env expr (v:ValRef, m) =
24252430 e, AddValEqualityInfo cenv.g m v einfo
24262431
24272432 | None ->
2428- if v.MustInline then error( Error( FSComp.SR.optFailedToInlineValue( v.DisplayName), m))
2433+ if v.MustInline
2434+ #if FABLE_ COMPILER
2435+ // no inlining for FSharp.Core
2436+ && not ( v.ToString() .Contains( " FSharp.Core." ))
2437+ #endif
2438+ then error( Error( FSComp.SR.optFailedToInlineValue( v.DisplayName), m))
24292439 expr, ( AddValEqualityInfo cenv.g m v
24302440 { Info= valInfoForVal.ValExprInfo
24312441 HasEffect= false
You can’t perform that action at this time.
0 commit comments