New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit folders are incorrectly ordered in F# projects #3747

Closed
dsyme opened this Issue Jan 27, 2018 · 0 comments

Comments

Projects
None yet
4 participants
@dsyme
Contributor

dsyme commented Jan 27, 2018

I noticed that the folders in FSharp.Compiler.Private.fsproj of http://github.com/Microsoft/visualfsharp are out of order, e.g. folders Reflection and ErrorText implied by the fragment of FSharp.Compiler.Private.fsproj below

image

Looking at the sorting code I believe this is because these folders are implied by the Link entries in the project file. But the sorting code is sorting by file path using the index of the first file in the folder:

        let childfile =
            folder.Project.Files
            |> Seq.tryFind (fun p -> p.FilePath.IsChildPathOf folder.Path)

Note the use of FilePath and folder.Path.

Here's the fragment of the project file:

    <Compile Include="..\..\utils\reshapedreflection.fs">
      <Link>Reflection\reshapedreflection.fs</Link>
    </Compile>
    <Compile Include="..\..\utils\reshapedmsbuild.fs">
      <Link>Reflection\reshapedmsbuild.fs</Link>
    </Compile>
    <Compile Include="..\..\utils\sformat.fsi">
      <Link>ErrorText\sformat.fsi</Link>
    </Compile>
    <Compile Include="..\..\utils\sformat.fs">
      <Link>ErrorText\sformat.fs</Link>
    </Compile>

VS bug #566631

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment