Skip to content
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

Globbing is failing for root and/or same named nested directory #1925

Closed
matthid opened this issue May 12, 2018 · 1 comment
Closed

Globbing is failing for root and/or same named nested directory #1925

matthid opened this issue May 12, 2018 · 1 comment

Comments

@matthid
Copy link
Member

matthid commented May 12, 2018

Description

This change should - in theory - be a noop. But it fixes invalid matches in the following glob:

    let dllsAndLibDirs (dllPattern:IGlobbingPattern) = 
        let dlls = 
            dllPattern
            |> Seq.distinctBy Path.GetFileName
            |> List.ofSeq
        let libDirs = 
            dlls
            |> Seq.map Path.GetDirectoryName
            |> Seq.distinct
            |> List.ofSeq
        (dlls,libDirs)      
    let fake5LegacyDlls, fake5LegacyLibDirs = 
        !! "./build/**/Fake.*.dll"
          ++ "./build/FakeLib.dll"
          -- "./build/**/Fake.Experimental.dll"
          -- "./build/**/FSharp.Compiler.Service.dll"
          -- "./build/**/netcore/FAKE.FSharp.Compiler.Service.dll"
          -- "./build/**/FAKE.FSharp.Compiler.Service.dll"
          -- "./build/**/Fake.IIS.dll"
          -- "./build/**/Fake.Deploy.Lib.dll"
        |> dllsAndLibDirs

This is on circle-ci where the repository is checked out at /build so there might be a conflict on /build/build here

Repro steps

  1. Revert the change
  2. Trigger a build on circle-ci

Expected behavior

Works, ie the glob should not match files in /build/test/

Actual behavior

Glob matches files it shouldn't match

Known workarounds

See the change

Related information

I tried to follow the code and reproduce it in fsi (mono), however I failed. It might be some specific .net core behavior on unix.

matthid added a commit that referenced this issue May 18, 2018
@matthid
Copy link
Member Author

matthid commented May 18, 2018

With the recent globbing fixes I found this as well and it should be fixed with RC014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant