-
Notifications
You must be signed in to change notification settings - Fork 0
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
Introduce use_same_package_name #39
base: mercury
Are you sure you want to change the base?
Conversation
c424319
to
77bd74c
Compare
d5551b9
to
aed5ba0
Compare
77bd74c
to
fac657d
Compare
aed5ba0
to
1c6cc18
Compare
fac657d
to
ba2c53a
Compare
1c6cc18
to
3983076
Compare
Maybe we can have more features related to this, to control the |
to use the specified name as GHC package name. In some special cases (especially GHC boot libraries), the package name needs to be given as specified.
3983076
to
cc77db0
Compare
@@ -188,6 +188,7 @@ haskell_library = prelude_rule( | |||
"linker_flags": attrs.list(attrs.arg(), default = []), | |||
"platform": attrs.option(attrs.string(), default = None), | |||
"platform_linker_flags": attrs.list(attrs.tuple(attrs.regex(), attrs.list(attrs.arg())), default = []), | |||
"use_same_package_name": attrs.bool(default = False), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could be an optional package_id
attribute instead? The default behavior would still be the current behavior, i.e. equivalent with use_same_package_name = False
, but then when package_id
is set it's a bit more flexible and allows users direct control over the package id if needed. (For reference Bazel rules_haskell has something like this too.)
Also, to clarify. IIUC this actually directly influences -this-unit-id
, correct? So, maybe the name package_id
is more appropriate than package_name
, or maybe it should directly be called unit_id
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that sounds reasonable and with clearer semantics (name means many things). I will change this to optional explicit package-id
. Thanks for suggestion!
to use the specified name as GHC package name.
In some special cases (especially GHC boot libraries), the package name needs to be given as specified.