You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GraphBasedChecking can break compilation when having unused open #16225
Separately, we should consider either escaping the contents of Mermaid graphs, or at least replacing \ with / to avoid \n being presented as a newline:
This mermaid .md file:
Activity
vzarytovskii commentedon Nov 3, 2023
@nojaf @safesparrow fyi
vzarytovskii commentedon Nov 3, 2023
@BoundedChenn31 saw your message in the chat, thanks for the minimal repro
nojaf commentedon Nov 3, 2023
Problematic in what SDK? Reproduceable on main?
safesparrow commentedon Nov 3, 2023
I reproduced it now on
8.0.100-rc.2. Note that namespace names must match (as showcased in the example code).safesparrow commentedon Nov 3, 2023
The problem, as expected, is lack of a dependency from
B.fstoA.fs.This fails:
1.
Graph:
flowchart RL 0["obj\Debug\net7.0\.NETCoreApp,Version=v7.0.AssemblyAttributes.fs"] 1["obj\Debug\net7.0\fmodule.AssemblyInfo.fs"] 2["A.fs"] 3["B.fs"]Trie:
classDiagram class root root <|-- ns_Microsoft class ns_Microsoft { .NETCoreApp,Version=v7.0.AssemblyAttributes.fs(0) } ns_Microsoft <|-- ns_BuildSettings class ns_BuildSettings { .NETCoreApp,Version=v7.0.AssemblyAttributes.fs(0) } root <|-- ns_FSharp class ns_FSharp { fmodule.AssemblyInfo.fs(1) } root <|-- ns_A class ns_A { B.fs[3] A.fs(2) }These succeed:
2.
Graph:
flowchart RL 0["obj\Debug\net7.0\.NETCoreApp,Version=v7.0.AssemblyAttributes.fs"] 1["obj\Debug\net7.0\fmodule.AssemblyInfo.fs"] 2["A.fs"] 3["B.fs"] 3 --> 2Trie:
classDiagram class root root <|-- ns_Microsoft class ns_Microsoft { .NETCoreApp,Version=v7.0.AssemblyAttributes.fs(0) } ns_Microsoft <|-- ns_BuildSettings class ns_BuildSettings { .NETCoreApp,Version=v7.0.AssemblyAttributes.fs(0) } root <|-- ns_FSharp class ns_FSharp { fmodule.AssemblyInfo.fs(1) } root <|-- ns_A class ns_A { A.fs(2) B.fs(3) } ns_A <|-- mod_X class mod_X { B.fs[3] }Graph:
flowchart RL 0["obj\Debug\net7.0\.NETCoreApp,Version=v7.0.AssemblyAttributes.fs"] 1["obj\Debug\net7.0\fmodule.AssemblyInfo.fs"] 2["A.fs"] 3["B.fs"] 3 --> 2Trie:
classDiagram class root root <|-- ns_Microsoft class ns_Microsoft { .NETCoreApp,Version=v7.0.AssemblyAttributes.fs(0) } ns_Microsoft <|-- ns_BuildSettings class ns_BuildSettings { .NETCoreApp,Version=v7.0.AssemblyAttributes.fs(0) } root <|-- ns_FSharp class ns_FSharp { fmodule.AssemblyInfo.fs(1) } root <|-- ns_A class ns_A { A.fs(2) } root <|-- ns_B class ns_B { B.fs[3] }safesparrow commentedon Nov 3, 2023
@nojaf this is reproducible on latest main.
safesparrow commentedon Nov 3, 2023
Separately, we should consider either escaping the contents of Mermaid graphs, or at least replacing
\with/to avoid\nbeing presented as a newline:This mermaid .md file:
yields the below node:

nojaf commentedon Nov 4, 2023
I can reproduce this with RC2 but not with my local compiler.
@safesparrow could you try:
git clean -xdf(of fsharp repo)dotnet build src/fsc/fscProject/fsc.fsproj /p:BUILDING_USING_DOTNET=true<DotnetFscCompilerPath>C:\YourProjectFolder\fsharp\artifacts\bin\fsc\Debug\net8.0\fsc.dll</DotnetFscCompilerPath>safesparrow commentedon Nov 4, 2023
@nojaf You're right, my test setup was wrong (I haven't used the compiler from source in a while).
Looks like this is already fixed on main as you said.
Code:
Graph:
flowchart RL 0["obj\Debug\net7.0\.NETCoreApp,Version=v7.0.AssemblyAttributes.fs"] 1["obj\Debug\net7.0\fmodule.AssemblyInfo.fs"] 2["A.fs"] 3["B.fs"] 3 --> 2Trie:
classDiagram class root root <|-- ns_Microsoft class ns_Microsoft { .NETCoreApp,Version=v7.0.AssemblyAttributes.fs(0) } ns_Microsoft <|-- ns_BuildSettings class ns_BuildSettings { .NETCoreApp,Version=v7.0.AssemblyAttributes.fs(0) } root <|-- ns_FSharp class ns_FSharp { fmodule.AssemblyInfo.fs(1) } root <|-- ns_A class ns_A { A.fs(2) }