Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .fantomasignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ src/Compiler/Checking/SignatureConformance.fs
src/Compiler/Checking/TypeHierarchy.fs
src/Compiler/Checking/TypeRelations.fs

# Incorrectly formatted: https://github.com/dotnet/fsharp/pull/14645/commits/49443a67ea8a17670c8a7c80c8bdf91f82231e91 or https://github.com/fsprojects/fantomas/issues/2733
src/Compiler/Driver/CompilerImports.fs

src/Compiler/DependencyManager/AssemblyResolveHandler.fs
src/Compiler/DependencyManager/DependencyProvider.fs
src/Compiler/DependencyManager/NativeDllResolveHandler.fs
Expand Down
4 changes: 4 additions & 0 deletions FSharpBuild.Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
<OtherFlags Condition="$(AdditionalFscCmdFlags) != ''">$(OtherFlags) $(AdditionalFscCmdFlags)</OtherFlags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Proto'">
<OtherFlags>$(OtherFlags) --define:NO_TYPEPROVIDERS</OtherFlags>
</PropertyGroup>

<!-- nuget -->
<PropertyGroup>
<PackageIconFullPath>$(MSBuildThisFileDirectory)icon.png</PackageIconFullPath>
Expand Down
3 changes: 2 additions & 1 deletion src/Compiler/Checking/NicePrint.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2112,9 +2112,10 @@ module TastDefinitionPrinting =

| _ when isNil allDecls ->
lhsL

#if !NO_TYPEPROVIDERS
| TProvidedNamespaceRepr _
| TProvidedTypeRepr _
#endif
| TNoRepr ->
allDecls
|> applyMaxMembers denv.maxMembers
Expand Down
7 changes: 6 additions & 1 deletion src/Compiler/Driver/CompilerImports.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1096,8 +1096,9 @@ and [<Sealed>] TcImports
initialResolutions: TcAssemblyResolutions,
importsBase: TcImports option,
dependencyProviderOpt: DependencyProvider option
) as this
)
#if !NO_TYPEPROVIDERS
as this
#endif
=

Expand Down Expand Up @@ -2016,10 +2017,14 @@ and [<Sealed>] TcImports
UsesFSharp20PlusQuotations = minfo.usesQuotations
MemberSignatureEquality = (fun ty1 ty2 -> typeEquivAux EraseAll (tcImports.GetTcGlobals()) ty1 ty2)
TypeForwarders = ImportILAssemblyTypeForwarders(tcImports.GetImportMap, m, ilModule.GetRawTypeForwarders())
#if !NO_TYPEPROVIDERS
XmlDocumentationInfo =
match tcConfig.xmlDocInfoLoader with
| Some xmlDocInfoLoader -> xmlDocInfoLoader.TryLoad(fileName)
| _ -> None
#else
XmlDocumentationInfo = None
#endif
}

let ccu = CcuThunk.Create(ccuName, ccuData)
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Interactive/fsi.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3473,8 +3473,8 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i
let resolveAssemblyRef (aref: ILAssemblyRef) =
// Explanation: This callback is invoked during compilation to resolve assembly references
// We don't yet propagate the ctok through these calls (though it looks plausible to do so).
let ctok = AssumeCompilationThreadWithoutEvidence ()
#if !NO_TYPEPROVIDERS
let ctok = AssumeCompilationThreadWithoutEvidence ()
match tcImports.TryFindProviderGeneratedAssemblyByName (ctok, aref.Name) with
| Some assembly -> Some (Choice2Of2 assembly)
| None ->
Expand Down
13 changes: 9 additions & 4 deletions src/Compiler/Service/IncrementalBuild.fs
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,11 @@ module IncrementalBuilderHelpers =
enableBackgroundItemKeyStoreAndSemanticClassification,
defaultPartialTypeChecking,
beforeFileChecked,
fileChecked,
importsInvalidatedByTypeProvider: Event<unit>) : NodeCode<BoundModel> =
fileChecked
#if !NO_TYPEPROVIDERS
,importsInvalidatedByTypeProvider: Event<unit>
#endif
) : NodeCode<BoundModel> =

node {
let diagnosticsLogger = CompilationDiagnosticLogger("CombineImportedAssembliesTask", tcConfig.diagnosticsOptions)
Expand Down Expand Up @@ -1664,8 +1667,10 @@ type IncrementalBuilder(initialState: IncrementalBuilderInitialState, state: Inc
enableBackgroundItemKeyStoreAndSemanticClassification,
enablePartialTypeChecking,
beforeFileChecked,
fileChecked,
importsInvalidatedByTypeProvider
fileChecked
#if !NO_TYPEPROVIDERS
,importsInvalidatedByTypeProvider
#endif
)

let getFSharpSource fileName =
Expand Down
3 changes: 3 additions & 0 deletions src/Compiler/Service/ServiceDeclarationLists.fs
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,9 @@ module internal DescriptionListsImpl =

/// Select the items that participate in a MethodGroup.
let SelectMethodGroupItems g m item =
#if NO_TYPEPROVIDERS
ignore m
#endif
match item with
| Item.CtorGroup(nm, cinfos) -> List.map (fun minfo -> Item.CtorGroup(nm, [minfo])) cinfos
| Item.Trait traitInfo ->
Expand Down