Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FSharp build is broken due to new Path.GetFileName() overload #8310

@akoeplinger

Description

@akoeplinger

Steps to Reproduce

  1. Build FSharp
  2. It fails during build

This was most likely introduced because #7867 introduced new Span overloads on Path.GetFileName() from corefx.

Current Behavior

"@/external/bockbuild/builds/fsharp-fsharp-561af8b/src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj" (default target) (1) ->
(CopyAndSubstituteTextFiles target) -> 
  @/external/bockbuild/builds/fsharp-fsharp-561af8b/src/scripts/scriptlib.fsx(64,25): error FS0041: A unique overload for method 'GetFileName' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: Path.GetFileName(path: ReadOnlySpan<char>) : ReadOnlySpan<char>, Path.GetFileName(path: string) : string [@/external/bockbuild/builds/fsharp-fsharp-561af8b/src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj]
  @/external/bockbuild/builds/fsharp-fsharp-561af8b/src/FSharpSource.targets(207,5): error MSB3073: The command "mono @/external/bockbuild/builds/fsharp-fsharp-561af8b/packages/FSharp.Compiler.Tools.4.1.27/tools/fsi.exe --exec "@/external/bockbuild/builds/fsharp-fsharp-561af8b/src/scripts/subst.fsx" --in:"@/external/bockbuild/builds/fsharp-fsharp-561af8b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets" --out:"@/external/bockbuild/builds/fsharp-fsharp-561af8b/src/fsharp/FSharp.Build-proto/../../../Proto/net40/bin/Microsoft.FSharp-proto.targets" --pattern1:"{BuildSuffix}" --replacement1:"-proto" --pattern2:"" --replacement2:"" " exited with code 1. [@/external/bockbuild/builds/fsharp-fsharp-561af8b/src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj]

    0 Warning(s)
    2 Error(s)

Expected Behavior

No build failure.

On which platforms did you notice this

[ X ] macOS
[ ] Linux
[ ] Windows

Version Used: master

This is similar to #7826

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions