Problem/Motivation
Seems like the hal module is fighting beyond its grave...
There are still a few (textual) references to it around in 10.0.x-dev even after its removal in #3049857: Remove HAL module from core and create a contrib project for it.
Steps to reproduce
Proposed resolution
Find and delete/fix/alter/whatever remaining (textual) references, so nothing refers to the now Contrib module hal, so the Core hal of the Mountain King can finally be sealed forever.
Remaining tasks
Identify remaining (textual) references to the hal module in core
Delete/fix/alter/whatever them.
Agree on the changes made
Commit
Put on some Grieg to celebrate
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3266544
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3266544-remove-remaining-textual
changes, plain diff MR !1891
Comments
Comment #3
spokjeBesides the changes in the MR, there are still some references to
halin Core:-
core/modules/serialization/serialization.services.ymlhas a few references explaining the priority of some services-
core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.phphas a reference explaining "Some top-level keys in the normalization may not be fields on the entity"I think at least the first one should stay, the second one is a maybe for me.
I now put this issue on
Needs review, which will probably remain until32.0.x-devor thereabout...Comment #4
smustgrave commentedFirst great issue summary
The changes to me look good. Can you update the MR to 10.1 though please. Then I don't mind marking RTBC.
Comment #5
spokjeComment #6
spokjeComment #7
smustgrave commentedThanks!
Changes look good to me.
Comment #8
xjmThese are the references I find with the MR applied:
The
system.installone needs to stay for sure, as does the upgrade path fixture. The transliteration match is clearly unrelated.However, I'm not sure that I agree with @Spokje that the references in
serialization.services.ymlshould be kept, and I don't know what to do with the comment inEntityResourceTestBase.Let's get a subsystem maintainer review from one of the API-First maintainers on what to do with those two.
Comment #9
xjm(Aside: 🍪 for you for "HAL of the Mountain King".)
Comment #10
bbralaThe comment in the test could just be trimmed imo.
Regarding the services, i understand you'd probably rather have those removed. This would be my first reaction also.
But I'm trying to imagine what will happen in a while if we remove those. Wouldn't it be rather confusing why those priorities exist? I might end up sending someone into a rabbithole. Also those comments are a pointer to an issue regarding a better way to select normalizers. (#2575761: Discuss a better system for discovering and selecting normalizers).
When examining the 'blame' it does seem to point in the right direction though, so someone who might need to find out, can. Pretty clean commit which actually added the comments also. I've added a link to the above issue in #2827218: Denormalization on field items is never called: add FieldNormalizer + FieldItemNormalizer with denormalize() methods, so it is still discoverable though some digging.
My conclusion, the information is clear enough, even without those comments. And it does feel weird to have hal live on through that. So I'd remove them.
Comment #11
spokjeThanks to both @xjm and @bbrala.
I'm a bit confused in what file the below mentioned comment should be trimmed.
Comment #12
bbralaIn the test I think.
core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.phpComment #13
spokjeThanks @bbrala, unsure how I've missed that.
Comment #14
smustgrave commentedAppears that changes requested have been addressed.
Comment #15
xjmMy concern with the references in
serialization.services.ymlisn't that we mention HAL, it's that we're setting priorities relative to non-core services. I don't think we should just remove the comments; I think we should remove the code and the contrib module should be responsible for altering the priority of the services in the way that it needs. That should be possible, right?Assigning to @bbrala for feedback. :)
Comment #16
bbralaI've been thinking about this. And although I competly agree core should not serve contrib a change in how priorities work could mean sites will break in weird ways where custom serializers might not be called anymore as before. If there are sites that have implementere their own and rely on the order/priority currently output by core wouldn't those break?
So, I'm not against removing them BUT this really really does feal like something that is a BC break which would mean we would only be able to do that in 11. I'm just very weary of randomly breaking sites, which I know noone wants.
That's my 2ct. I might be overly defensive, but I do believe we will get weird breakage in a subset of sites.
Comment #17
smustgrave commentedCould we deprecate the service?
Comment #18
spokjeSo here is where we stand:
In the (rebased) MR there are no changes in
core/modules/serialization/serialization.services.yml, which means there will be still references to the HAL module explaining why some services in there have certain priorities.Suggested by @smustgrave in #17.
Not really, since we're not deprecating the services, but rather the comments about why certain services have certain priorities.
As fas as I can see, here are the options:
1) Get this MR in, discuss the references to HAL in
core/modules/serialization/serialization.services.yml, in a follow-up2) Decide here whether we want to keep to references or not and add the effect of that decision to the discussion the the MR in here and commit that.
3) Do "something nifty" in the contrib-module-HAL, which can juggle service priorities around. Even then we can't trust on all of the people having the "new way" module HAL installed, so we're still not sure we covered everybody.
Personally, I'm a fan of #1, but somebody somewhere in the ranks of Core Committers/Release Managers is probably needed to move this along. Especially seeing that the now-in-contrib module HAL already had no maintainer who we can ask on guidance.
Tagged with
Needs release manager review, since that's the only relevant tag I could find, happy to be directed in the correct (tag-)direction.Comment #19
catch+1 to this let's split it off since it's not just a textual reference but actual logic.
Comment #20
smustgrave commentedOpened #3345059: Discuss reference to HAL in serialization.service.yml
Comment #21
quietone commentedI have reviewed this and I think it is ready to commit. I will wait for other committers to comment. Otherwise, I will commit in a day or two.
Comment #23
quietone commentedA few days turned in a week.
Committed 837957e and pushed to 10.1.x. Thanks!
Work can continue in #3345059: Discuss reference to HAL in serialization.service.yml.