Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed merge issues
  • Loading branch information
ncave committed Nov 21, 2025
commit b28c8882b3c7282f0c3da94912421c5e479f80f5
1 change: 0 additions & 1 deletion buildtools/AssemblyCheck/AssemblyCheck.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(FSharpNetCoreProductTargetFramework)</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions buildtools/buildtools.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
BeforeTargets="CoreCompile">

<PropertyGroup>
<FsLexPath Condition="'$(FsLexPath)' == ''">$(ArtifactsDir)\bin\fslex\Release\net8.0\fslex.dll</FsLexPath>
<FsLexPath Condition="'$(FsLexPath)' == ''">$(ArtifactsDir)\bin\fslex\Release\net9.0\linux-x64\fslex.dll</FsLexPath>
</PropertyGroup>

<!-- Create the output directory -->
Expand All @@ -44,7 +44,7 @@
BeforeTargets="CoreCompile">

<PropertyGroup>
<FsYaccPath Condition="'$(FsYaccPath)' == ''">$(ArtifactsDir)\bin\fsyacc\Release\net8.0\fsyacc.dll</FsYaccPath>
<FsYaccPath Condition="'$(FsYaccPath)' == ''">$(ArtifactsDir)\bin\fsyacc\Release\net9.0\linux-x64\fsyacc.dll</FsYaccPath>
</PropertyGroup>

<!-- Create the output directory -->
Expand Down
1 change: 0 additions & 1 deletion buildtools/fslex/fslex.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(FSharpNetCoreProductTargetFramework)</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<RollForward Condition="'$(BUILDING_USING_DOTNET)' == 'true'">LatestMajor</RollForward>
<NoWarn>$(NoWarn);64;1204</NoWarn> <!--Temporary fix for sourcebuild -->
Expand Down
1 change: 0 additions & 1 deletion buildtools/fsyacc/fsyacc.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(FSharpNetCoreProductTargetFramework)</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<RollForward Condition="'$(BUILDING_USING_DOTNET)' == 'true'">LatestMajor</RollForward>
<NoWarn>$(NoWarn);64;1204</NoWarn> <!--Temporary fix for sourcebuild -->
Expand Down
3 changes: 2 additions & 1 deletion fcs/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

dotnet build -c Release buildtools
dotnet build -c Release buildtools/fslex
dotnet build -c Release buildtools/fsyacc
dotnet build -c Release src/Compiler
dotnet run -c Release --project fcs/fcs-test
echo "Binaries can be found here: /artifacts/bin/FSharp.Compiler.Service/Release/netstandard2.0/"
10 changes: 5 additions & 5 deletions fcs/fcs-test/fcs-test.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>

Expand All @@ -19,9 +19,9 @@
</ItemGroup>

<ItemGroup>
<!-- <PackageReference Include="FSharp.Core" Version="8.0.0" /> -->
<PackageReference Include="Buildalyzer" Version="5.0.1" />
<PackageReference Include="Fable.Core" Version="4.1.0" />
<PackageReference Include="Fable.Import.Browser" Version="1.4.0" />
<!-- <PackageReference Include="FSharp.Core" Version="9.0.0" /> -->
<PackageReference Include="Buildalyzer" Version="*" />
<PackageReference Include="Fable.Core" Version="*" />
<PackageReference Include="Fable.Import.Browser" Version="*" />
</ItemGroup>
</Project>
11 changes: 5 additions & 6 deletions fcs/service_slim.fs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ module internal ParseAndCheck =
SimulatedMSBuildReferenceResolver.getResolver(),
defaultFSharpBinariesDir = FSharpCheckerResultsSettings.defaultFSharpBinariesDir,
reduceMemoryUsage = ReduceMemoryFlag.Yes,
implicitIncludeDir = Path.GetDirectoryName(projectOptions.ProjectFileName),
implicitIncludeDir = !! Path.GetDirectoryName(projectOptions.ProjectFileName),
isInteractive = false,
isInvalidationSupported = true,
defaultCopyFSharpCore = CopyFSharpCoreFlag.No,
Expand All @@ -134,15 +134,14 @@ module internal ParseAndCheck =
let dependencyProvider = new DependencyProvider()
let! tcGlobals, tcImports =
TcImports.BuildTcImports (tcConfigP, dependencyProvider)
|> Async.AwaitNodeCode

// Handle type provider invalidation by resetting compiler state
tcImports.GetCcusExcludingBase()
|> Seq.iter (fun ccu ->
ccu.Deref.InvalidateEvent.Add(fun _ -> reset())
)

let assemblyName = projectOptions.ProjectFileName |> Path.GetFileNameWithoutExtension
let assemblyName = !! Path.GetFileNameWithoutExtension(projectOptions.ProjectFileName)
let tcInitial, openDecls0 = GetInitialTcEnv (assemblyName, rangeStartup, tcConfig, tcImports, tcGlobals)
let tcInitialState = GetInitialTcState (rangeStartup, assemblyName, tcConfig, tcGlobals, tcImports, tcInitial, openDecls0)

Expand All @@ -166,7 +165,7 @@ module internal ParseAndCheck =
topAttrsOpt: TopAttribs option, tcImplFilesOpt: CheckedImplFile list option, compilerState) =
let assemblyRef = mkSimpleAssemblyRef "stdin"
let access = tcState.TcEnvFromImpls.AccessRights
let symbolUses = Choice2Of2 TcSymbolUses.Empty
let symbolUses = Choice2Of2 (async { return seq { } })
let dependencyFiles = parseResults |> Seq.map (fun x -> x.DependencyFiles) |> Array.concat
let getAssemblyData () = None
let details = (compilerState.tcGlobals, compilerState.tcImports, tcState.Ccu, tcState.CcuSig, symbolUses, topAttrsOpt,
Expand Down Expand Up @@ -313,12 +312,12 @@ type InteractiveChecker internal (compilerStateCache) =
let ctok = CompilationThreadToken()
let flatErrors = compilerState.tcConfig.flatErrors
let errors, diagnosticsLogger, _loggerProvider = CompileHelpers.mkCompilationDiagnosticsHandlers(flatErrors)
let exitCode =
let exnOpt =
CompileHelpers.tryCompile diagnosticsLogger (fun exiter ->
CompileFromTypedAst (ctok, compilerState.tcGlobals, compilerState.tcImports, tcState.Ccu,
tcImplFiles, topAttrs, compilerState.tcConfig, outFile, diagnosticsLogger, exiter))

return errors.ToArray(), exitCode
return errors.ToArray(), exnOpt
}

/// Parses and checks the whole project, good for compilers (Fable etc.)
Expand Down
1 change: 1 addition & 0 deletions src/Compiler/Checking/NicePrint.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,7 @@ module InfoMemberPrinting =
|> PrintTypes.layoutCsharpCodeAnalysisIlAttributes denv mi.RawMetadata.Return.CustomAttrs (squareAngleReturn >> (@@))
let paramLayouts =
minfo.GetParamDatas (amap, m, minst)
|> List.map (List.map fst)
|> List.head
|> List.zip mi.ParamMetadata
|> List.map(fun (ilParams,paramData) ->
Expand Down
4 changes: 2 additions & 2 deletions src/Compiler/Driver/fsc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1254,14 +1254,14 @@ let CompileFromTypedAst
typedImplFiles,
topAttrs,
tcConfig: TcConfig,
outfile,
outfile: string,
diagnosticsLogger,
exiter: Exiter
) =

let tcImportsCapture = None
let dynamicAssemblyCreator = None
let assemblyName = Path.GetFileNameWithoutExtension(outfile)
let assemblyName = !! Path.GetFileNameWithoutExtension(outfile)
// Doubling here tcImports as frameworkTcImports, seems to work...
let frameworkTcImports = tcImports
let pdbfile = None
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Service/service.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ open FSharp.Compiler.Driver

module internal CompileHelpers =
val mkCompilationDiagnosticsHandlers: bool -> ResizeArray<FSharpDiagnostic> * DiagnosticsLogger * IDiagnosticsLoggerProvider
val tryCompile: DiagnosticsLogger -> (StopProcessingExiter -> unit) -> int
val tryCompile: DiagnosticsLogger -> (StopProcessingExiter -> unit) -> exn option

/// Used to parse and check F# source code.
[<Sealed; AutoSerializable(false)>]
Expand Down