-
Notifications
You must be signed in to change notification settings - Fork 16
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
Move ClosureType
from ghc-heap into GHC.ClosureTypes
#122
Comments
To start with, the addition of a new public module |
It looks like |
I've noticed that the commit that removes |
...and missing from |
@Bodigrim Please can you open a GHC ticket if there is a problem with GHC which needs resolution? @TeofilC As far as I am aware it has only been communicated to GHC developers that CLC policy within the last two weeks that ALL changes to base have to go through this process. That change to `whereFrom lies firmly outside the statute of limitiations. This ticket is solely about the proposal to add ClosureType into the GHC.ClosureTypes module, so please can we focus on starting that discussion so that we can make progress on this issue on the GHC side? |
That makes sense. Thanks for that context @mpickering! |
There is certainly a miscommunication. Back in November 2021 Simon suggested CLC to monitor all, even minute changes to Bottom line is that CLC oversees less than it was suggested by GHC developers, and the scope has been communicated multiple times. There've been no recent change of policy, certainly not in the last two weeks or so.
Indeed, we are trying to focus on your proposal, which starts with "The I've raised https://gitlab.haskell.org/ghc/ghc/-/issues/22883 to help tracking this on GHC side. Matthew, I'm happy to jump on a brief call if it helps. |
Back to the proposal, this is a breaking change, but Dear CLC members, any opinions on this? (This is not a vote yet) @TeofilC could you please update the MR fixing suggestions? |
I've updated the MR hopefully the new version should resolve all the suggestions |
+1 if and only if
Additionally, I believe @bgamari is working on a plan for the |
Depending on how popular 9.6.1 is going to be, it could still happen that large proprietary code bases adopt this type and will break in the next major base release. Is there a way to manage this with a deprecation phase and a new function? |
I personally don't think this would be worth the effort and added complexity. Instead I'm thinking about publishing a Would that address your concern @hasufell ? |
To summarise the changes w.r.t. to
So, as we can see, it is a breaking change to the existing public API of So I'm +1 on this. I can empathise with GHC developers seeing the CLC process as unnecessary overhead to their daily work. To sweeten the pill, I can say that a CLC proposal can act as additional documentation to all the changes with the opportunity to receive early feedback from more people. If GHC developers want to decrease the CLC involvement in the internals of the GHC-specific changes, I can suggest the following paths forward:
As I understand, some of these are already being worked on. But until then, it's mandatory to have a CLC proposal to all changes in the public API of |
That's highly unlikely, this stuff is not for business logic, just for diagnostic tools. I strongly suspect that all its users are already present in this thread ;) If I'm not mistaken, the current version of the API has never been externally reviewed, and IMO it makes little sense to enshrine its warts under a compatibility layer.
Precisely my thoughts. The clients of |
That's a very nice idea. Dear CLC members, let's vote on the proposal to move This is a breaking change, but both modules are very new and virtually unused (see https://hackage-search.serokell.io/?q=import.*GHC.Stack.CloneStack and https://hackage-search.serokell.io/?q=import.*GHC.InfoProv). To mitigate the breakage the proposer is willing to develop a compatibility package. @tomjaguarpaw @chshersh @mixphix @angerman @parsonsmatt @hasufell +1 from me. |
+1 |
-1 because this doesn't satisfy the conditions in #122 (comment). Actually I don't see why it can't be in a Have I misunderstood something here? Are the things exported here expected to be stable? Or is there something else I have missed? If so then please correct me. I can change my vote if necessary. But at the moment I don't see why this GHC internal should leak from |
|
@TeofilC there've been plenty of time to respond and amend before the vote, please do not invalidate the votes already cast by changing the proposal. We are volunteers and being wasteful with our limited resources is not encouraged. Nevertheless you do have a formal right to withdraw the proposal and submit a new one, if you wish. That said, I did expect the new API to be stable and not to be broken on a whim in future. Is it not the case? |
Very fair! Do ignore my comment about changing the module name. Presumably |
+1 |
-1 |
I--similar like @tomjaguarpaw probably--had hoped to hear from @bgamari on this as to how this ties in with the future plans. I will say I do prefer the better naming; it makes debugging and reading much easier. Yet we now replicate a data structure in base from a header in the rts. And this is in a non-automated fashion, looking at the MR, I do not see how they are kept in sync. We now risk that at some point the rts's header file might change, and base starts to diverge; now we do have a hard dependency on the rts from base already (base calls all kinds of things in the rts), but I'd still like to ensure that these do not diverge. Especially as the new module is exposed from base; in which case I also believe the ClosureType should have a more extensive haddock documentation. Someone is going to look at this, and eventually try to use it (which again raises what @tomjaguarpaw mentioned: is this a stable api?), so there needs to be some discussion around ClosureTypes in the Haddocks. For now I'm -1 on this. However, if given
I'd be +1. |
I also vote -1 for this specific instance and largely agree with @angerman Dealing with Int in low-level API is trash, so this generally looks like an improvement if we can clear up the mentioned concerns. So I'd be excited to vote on a follow up proposal. |
Just to clarify, I'm the one committing to writing to a compat package not mpickering. He's the proposer, while I'm the one who wrote the GHC MR. |
Thanks everyone for your thoughts! I feel like the main concern is about the stability of this interface.
There's already a checklist in
Would a short paragraph summarising what a closure type is (and the fact that it's an implementation detail of the RTS) and a link to https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts/storage/heap-objects suffice. Or did you have something more in mind @angerman ? |
@angerman, I had not given much consideration to the interaction between this and #145/#146 until your ping. Having reflected on this a bit, I would propose that, if #145 is accepted, the Another solution would be for My sense is that the former, more conservative option is preferable. |
Just to be clear, both #145 and #146 are in early stages and may easily take several months. I think there are good chances for a follow-up proposal, which adresses raised concerns, to be approved earlier. Closing as declined (I assume @tomjaguarpaw remains unsatisfied). Thanks for your effort and discussion, @TeofilC. |
GHC MR: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9560
The
whereFrom
function defined inGHC.InfoProv
returns the IPE information for a specific closure. TheInfoProv
data type used to represent the closure type of said closure using an integer. From a user perspective it's better to decode this and represent the closure type as an ADT.Fortunately such an ADT already exists but it is defined in
ghc-heap
, so we have to move the definition of this ADT intobase
so it can be used bywhereFrom
and alsoghc-heap
.With this change the closure type can be properly represented using
ClosureType
for anyone using thewhereFrom
function.The text was updated successfully, but these errors were encountered: