Skip to content
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

Open
wants to merge 1 commit into
base: mercury
Choose a base branch
from

Conversation

wavewave
Copy link
Collaborator

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.

@wavewave wavewave force-pushed the wavewave/boot-dep-graph branch from c424319 to 77bd74c Compare September 10, 2024 04:51
@wavewave wavewave force-pushed the wavewave/optional-pkgname branch from d5551b9 to aed5ba0 Compare September 10, 2024 04:52
@wavewave wavewave force-pushed the wavewave/boot-dep-graph branch from 77bd74c to fac657d Compare September 12, 2024 16:18
@wavewave wavewave force-pushed the wavewave/optional-pkgname branch from aed5ba0 to 1c6cc18 Compare September 12, 2024 16:20
@wavewave wavewave force-pushed the wavewave/boot-dep-graph branch from fac657d to ba2c53a Compare September 24, 2024 23:07
@wavewave wavewave force-pushed the wavewave/optional-pkgname branch from 1c6cc18 to 3983076 Compare September 24, 2024 23:10
@wavewave
Copy link
Collaborator Author

wavewave commented Oct 3, 2024

Maybe we can have more features related to this, to control the --this-unit-id flag.

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.
@wavewave wavewave force-pushed the wavewave/optional-pkgname branch from 3983076 to cc77db0 Compare October 3, 2024 13:10
@wavewave wavewave changed the base branch from wavewave/boot-dep-graph to mercury October 3, 2024 13:11
@wavewave wavewave marked this pull request as ready for review October 3, 2024 13:11
@wavewave wavewave requested review from aherrmann and avdv October 3, 2024 13:11
@@ -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),

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?

Copy link
Collaborator Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants