rules_haskell icon indicating copy to clipboard operation
rules_haskell copied to clipboard

Document that main_file shouldn't be used with modules

Open facundominguez opened this issue 3 years ago • 2 comments
trafficstars

If haskell_binary or haskell_test use the main_file attribute and the modules attribute, either main_file will be ignored or it will produce an error.

Since #1740, it is possible to use the main_function attribute together with the modules attribute.

This issue is about either documenting that main_file doesn't work with haskell_module, and adding or revising the error message if needed to make the cause of the error obvious.

facundominguez avatar Aug 17 '22 13:08 facundominguez

In the case we're using modules, we're somewhat abstracted from the files for underlying modules, so I think it makes sense for main_file to simply not work with modules. Hence I think this should simply be documented.

If there is something that main_file ends up being required for (you can't do it without), we should possibly consider adding main_module or something else to accommodate for that, while still retaining the fact we're working with modules and not directly with files.

googleson78 avatar Aug 17 '22 14:08 googleson78

I updated the description.

facundominguez avatar Aug 17 '22 16:08 facundominguez