Skip to content

Commit

Permalink
Normalise Filepaths for target matching
Browse files Browse the repository at this point in the history
  • Loading branch information
fendor committed Apr 1, 2020
1 parent 9ae54f4 commit f494fe1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cabal-install/Distribution/Client/TargetSelector.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,7 @@ matchComponentOtherFile cs =
++ cinfoCFiles c
++ cinfoJsFiles c
]
. normalise


matchComponentModuleFile :: [KnownComponent] -> String
Expand Down
2 changes: 1 addition & 1 deletion cabal-install/tests/IntegrationTests2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ testTargetSelectors reportSubCase = do
ts @?= replicate 5 (TargetComponent "p-0.1" (CLibName LMainLibName) (FileTarget "P"))
++ replicate 5 (TargetComponent "q-0.1" (CLibName LMainLibName) (FileTarget "QQ"))
++ replicate 5 (TargetComponent "q-0.1" (CLibName LMainLibName) (FileTarget "Q"))
++ replicate 5 (TargetComponent "p-0.1" (CExeName "ppexe") (FileTarget "app/Main.hs"))
++ replicate 5 (TargetComponent "p-0.1" (CExeName "ppexe") (FileTarget ("app" </> "Main.hs")))
-- Note there's a bit of an inconsistency here: for the single-part
-- syntax the target has to point to a file that exists, whereas for
-- all the other forms we don't require that.
Expand Down

0 comments on commit f494fe1

Please sign in to comment.