File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
tests/haskell_cabal_library Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -252,8 +252,9 @@ def _haskell_cabal_library_impl(ctx):
252252 ],
253253 )
254254 posix = ctx .toolchains ["@rules_sh//sh/posix:toolchain_type" ]
255+ package_name = ctx .attr .package_name if ctx .attr .package_name else hs .label .name
255256 package_id = "{}-{}" .format (
256- ctx . attr . package_name if ctx . attr . package_name else hs . label . name ,
257+ package_name ,
257258 ctx .attr .version ,
258259 )
259260 with_profiling = is_profiling_enabled (hs )
@@ -275,7 +276,7 @@ def _haskell_cabal_library_impl(ctx):
275276 )
276277 if ctx .attr .haddock :
277278 haddock_file = hs .actions .declare_file (
278- "_install/{}_haddock/{}.haddock" .format (package_id , ctx . attr . name ),
279+ "_install/{}_haddock/{}.haddock" .format (package_id , package_name ),
279280 sibling = cabal ,
280281 )
281282 haddock_html_dir = hs .actions .declare_directory (
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ cc_library(
1515)
1616
1717haskell_cabal_library (
18- name = "lib" ,
18+ name = "first-lib" ,
19+ package_name = "lib" ,
1920 srcs = [
2021 "Lib.hs" ,
2122 "lib.cabal" ,
@@ -43,7 +44,7 @@ haskell_test(
4344 srcs = ["Main.hs" ],
4445 deps = [
4546 ":base" ,
46- ":lib" ,
47+ ":first- lib" ,
4748 ":second-lib" ,
4849 ],
4950)
You can’t perform that action at this time.
0 commit comments