File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ def package(
52
52
other_modules ,
53
53
my_pkg_id ,
54
54
has_hs_library ,
55
+ has_iface = True ,
55
56
empty_libs_dir = "" ):
56
57
"""Create GHC package using ghc-pkg.
57
58
@@ -65,6 +66,7 @@ def package(
65
66
other_modules: List of hidden modules.
66
67
my_pkg_id: Package id object for this package.
67
68
has_hs_library: Whether hs-libraries should be created.
69
+ has_iface: Whether the import-dirs field should be populated.
68
70
empty_libs_dir: Directory name where the empty library should be.
69
71
If empty, this is assumed to be a package description
70
72
for a real library. See Note [Empty Libraries] in haskell_impl.bzl.
@@ -98,7 +100,7 @@ def package(
98
100
"key" : pkg_id .to_string (my_pkg_id ),
99
101
"exposed" : "True" ,
100
102
"hidden-modules" : other_modules ,
101
- "import-dirs" : [import_dir ],
103
+ "import-dirs" : [import_dir ] if has_iface else [] ,
102
104
"library-dirs" : [pkgroot_lib_path ] + extra_lib_dirs ,
103
105
"dynamic-library-dirs" : [pkgroot_lib_path ] + extra_dynamic_lib_dirs ,
104
106
"extra-libraries" : extra_libs ,
Original file line number Diff line number Diff line change @@ -544,6 +544,7 @@ def haskell_library_impl(ctx):
544
544
other_modules ,
545
545
my_pkg_id ,
546
546
non_empty ,
547
+ has_iface = non_empty ,
547
548
)
548
549
549
550
empty_libs_dir = "empty_libs"
@@ -557,6 +558,7 @@ def haskell_library_impl(ctx):
557
558
other_modules ,
558
559
my_pkg_id ,
559
560
has_hs_library = False ,
561
+ has_iface = non_empty ,
560
562
empty_libs_dir = empty_libs_dir ,
561
563
)
562
564
You can’t perform that action at this time.
0 commit comments