Problem/Motivation
In #3049856: [policy] Mark HAL module as deprecated in D9 so it can be removed in D10 we deprecated the HAL module with the intention to remove it from D9. This is the issue to do the actual removal.
Currently postponed on
#3263618: Deprecate HAL module
#3264633: Remove \Drupal\layout_builder\QuickEditIntegration and refactor it so that quickedit contrib provides the integration with layout builder
Proposed resolution
- Find someone to volunteer to maintain HAL in contrib. We have had troubles finding a maintainer for HAL in core for a while.
- Create a HAL module in contrib that users can update to seamlessly when upgrading to D9. We will also remove deprecations and BC layers as discussed in #3034062: Remove hal.module BC layers.
- Remove the code and the unused leftover dependencies (if any).
Remaining tasks
DONE. Hypermedia Application Language (HAL) Contrib project created with maintainers larowlan, Spokje, bbrala
Test the contrib module
Remove the module from core
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
The HAL module was introduced during the development of Drupal 8, but never received much traction in the decoupled scene due to the vague specification and issues with the implementation. As a result, few sites use HAL in production.Additionally, JSON:API in core offers a superset of features over HAL.
Therefore, HAL is deprecated in Drupal 9.4 and has been removed from Drupal 10.0. It is instead available as the HAL contributed project instead. If you need the functionality provided by HAL, read more on using the HAL contributed module.
| Comment | File | Size | Author |
|---|---|---|---|
| #50 | hal-module-references-in-core.png | 58.64 KB | bbrala |
Issue fork drupal-3049857
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:
Comments
Comment #2
e0ipsoComment #3
wim leersComment #4
jibranIf we are moving forward with this then we should create https://www.drupal.org/project/hal ASAP before someone else get some other ideas.
Comment #6
xjmThis is D10 material at this point. However, we should start by deprecating the module in a minor release, and then we can remove it cleanly in D10.
Comment #7
xjmComment #8
xjmMmm, also would need product signoff. FWIW I'm +1 (but not a product manager).
Comment #11
gábor hojtsyI provided product manager signoff in #3049856: [policy] Mark HAL module as deprecated in D9 so it can be removed in D10. That still appears to need release manager signoff, so postponing on that.
Also parenting to the Drupal 10 module removal issue.
Comment #12
gábor hojtsyComment #13
catchI think this can be unpostponed now that #3124762: Add 'lifecycle' key to .info.yml files has landed.
Comment #14
larowlanHappy to maintain it in contrib given entity pilot depends on it for the time being
Comment #15
andypost@larowlan please create https://www.drupal.org/project/hal
Comment #16
larowlanhttps://www.drupal.org/project/hal done
Comment #17
andypostNext step probably is to mark the module obsolete or just try to remove it?
Comment #20
spokjeThus spoketh @andypost in #17.
I think even putting this module on
lifecycle: obsoletemight already be a stretch.Looking at the "Proposed resolution" in the IS of #3049856: [policy] Mark HAL module as deprecated in D9 so it can be removed in D10 and comment #16 in that issue, I think
lifecycle: deprecatedandlifecycle: obsoletefor later/D10?If that is indeed the case: MR!830 is your friend.
(Also tagged with
Needs release note)Comment #21
catchIt should definitely only be deprecated in 9.x
For 10.x I think we probably need to go for direct removal instead of 'obsolete', because the course of action for a site updating to 10.x is to install the contrib module, or take a decision to uninstall the core module. Obsolete should IMO be reserved for 'not a module any more' (entity_reference, field_layout once it's merged somewhere), and development modules (simpletest).
Comment #22
longwaveAgree we can only deprecate in 9.x. For 10.0 we might have to leave a stub behind that can uninstall itself but is otherwise marked obsolete, like we did with simpletest; users can still install the contrib version if they want to keep the functionality.
Comment #24
spokje- Changed MR!830 for marking Core Module
lifecycle: deprecatefrom9.3.x=>9.4.x- Merged latest commits
Comment #25
spokjeWould this issue be helped out with a child
[Investigation]issue like #3227033: Remove Quick Edit from core was created for the removal of QuickEdit, to see what actions/tasks/whatever would be needed to get HAL out of Drupal Core and into Contrib?Comment #26
longwaveMarking this as RTBC as the one line change is trivial and there seem to be no objections to #3049856: [policy] Mark HAL module as deprecated in D9 so it can be removed in D10
@Spokje I think that is worth trying - there will be some rearranging of tests to do as the HAL entity tests are coupled to the module that provides the entity (or core), and I guess they need moving into the HAL module.
Comment #27
gábor hojtsyThanks for looking into this!
All of these issues are currently pratically postponed on #3215043: Indicate the non-stable statuses in admin/modules page, #3215045: [Duplicate] Highlight obsolete module's status at admin/reports/status page, providing warning and link with explanation so until we can resolve those, we are not making modules deperecated.
Comment #30
spokjeThanks @Gábor Hojtsy for pointing out the issues that this one is postponed on. Added those as related issues.
Turns out the lifecycle_link is also required when marking a module as
lifecycle: deprecate, so currently the tests in MR!830 are failing.We need something to point that link to, so there's probably a CR needed for that.
Unsure what MR!1499 with the _exact_ same change as MR!830 but against
9.2.xinstead of9.4.xbrings to the table TBH...Comment #31
spokje(Grmbl)
Restoring issue status.
Comment #32
gábor hojtsyUpdate related issues.
Comment #33
spokje#3215043: Indicate the non-stable statuses in admin/modules page just got committed, only postponed now on #3250585: Highlight deprecated modules and themes at admin/reports/status page, providing warning and link with explanation.
Comment #34
catchComment #35
catchComment #36
bbralaThis should only need a release note snippet, then i think we can RTBC.
Comment #37
bbralaComment #38
spokjeI agree with the need for a release note, but the current MR (MR!830) would (at the very least) need a
lifecycle_linkentry in the.info.yml. I'm uncertain at this point if that should link to the Release Notes To Be, or if there's a new page somewhere on d.o. where deprecated Core modules should link to.Besides that, there's #25 to move the corresponding tests into the correct namespace.
As an added bonus we need
a maintainer for the Contrib version of the HAL module, the creation of it,moving current outstanding issues against HAL core moved to that Contrib module and a D10.0.x actual removal of the module from Core.I'm a bit uncertain if all of the above need to be done in a follow-up issue, since I hate to see we're deprecating without the actual removal being handled.
Comment #39
bbralaIn #3049856: [policy] Mark HAL module as deprecated in D9 so it can be removed in D10 the removal was also approved and @larowlan offered to be maintainer of HAL and actually created the contrib module in #16. So that is kinda covered?
I personally separate the step to deprecate from the removal. But i understand that it might be scary to deprecate before rounding of the removal path.
Comment #40
spokjeAh, somehow managed to completely miss that, thanks for pointing that out @bbrala. :)
I've edited my previous comment to reflect that.
Will leave decisions on yes/no followup-issues for the removal to Bigger Brains.
Comment #41
catchIt's fine to have a deprecation issue for 9.4.x/10.0.x, and then a follow-up for the removal. The deprecation is important for letting sites know it's on its way out, the removal is essentially internal to core and doesn't need all the CR/release note etc.
Comment #42
bbralaOk that sounds good. I'll do the following:
Comment #43
bbralaCreated #3263618: Deprecate HAL module.
Comment #44
catchWe are still figuring the process out, but what should be more or less guaranteed to work in order:
1. Drupal ideas policy decision to deprecate and remove (in this case #3049856: [policy] Mark HAL module as deprecated in D9 so it can be removed in D10).
2. Core implementation issue opened (this one).
3. Contrib project created with at least one maintainer
4. Stable release of the contrib project ready to use on 9.4.x sites (https://www.drupal.org/project/hal is access denied for me, so we probably still need that)
4. Commit the issue to mark the module deprecated (to 9.4.x if 10.0.x wasn't open yet, or both branches if it is)
5. Commit the issue to remove the module to 10.0.x-only
Comment #45
bbralaI'll ping larowlan since he created the hal project
Comment #47
spokjeThus spoketh @bbrala in #42
- Closed deprecation D9.4.x MR
- Upped version to 10.0.x-dev
Comment #49
spokjeNew MR (MR!1800) against
10.0.x-devwith the "fun part" of removal:- Removal of
core/modules/hal-
COMPOSER_ROOT_VERSION=10.0.x-dev composer update drupal/core -vvvLets see what breaks...
Comment #50
bbralaA lot will break, i've just checked references to the string 'hal'in core. 135 results.
Mostly in tests except:
rest.modulewhich appearantly suggests HAL in it's help.Comment #51
spokje@bbrala: Yep, I just love breaking stuff (and am quite good as it, I might add...)
As (at least I) found out in #3227033: Remove Quick Edit from core it's nice to have a record of what breaks.
Also done in that issue: Moving of tests that are _not_ in the modules namespace (which we'll see in the above failed tests) to the
\Drupal\halnamespace as well as moving them into the modules directory.This made it much easier to create a self contained Contrib module.
Seeing the amount of references to "hal" in your screenshot, it seems to me that it might be nice/wise to do the same here:
Moving "shit" (aka tests for the HAL module not in the hal-directory) around (aka move them into the hal-directory and namespace).
If it were up to me (which it isn't) I would do this in
9.4.x-dev, again just to make sure we have all and everything/kitchensinks covered and can basically movecore/modules/halinto its own Contrib module and be sure all is on board.Comment #52
bbralaThere is something to say to move the tests in 9.4.x already. But personally I don't really have a preference. One reason to do that could be that there is less chance things changes need separate patches for d9 and d10 in the coming months :x
Comment #53
catchMoving the tests in 9.4.x is a good plan, since it'll make any potential security issue for the contrib module in 10.0.x easier to backport to core 9.4.x (although for hal specifically this is not a major concern, but in general).
If the hal project doesn't have the code in it yet, then it'll be a cleaner subtree split too.
Comment #54
bbralaActually working on it here #3263654: Move all HAL tests to the module in preparation of removal in D10. Although im not pushing every commit right now :P
Comment #55
spokjePostponing on moving tests in #3263654: Move all HAL tests to the module in preparation of removal in D10
Comment #56
spokjeThus spoketh @xjm in [#2966859-32]
Comment #57
catchComment #58
bbralaBlocker got committed :)
Comment #59
bbralaComment #60
spokjePostponing on #3264633: Remove \Drupal\layout_builder\QuickEditIntegration and refactor it so that quickedit contrib provides the integration with layout builder.
Reasoning: If tests get committed in the Core
halmodule (See #3264633-18: Remove \Drupal\layout_builder\QuickEditIntegration and refactor it so that quickedit contrib provides the integration with layout builder), they have to be removed in MR/patch in this issue as well.Comment #61
spokjeComment #62
spokjeComment #63
quietone commentedThe failure of Drupal\Tests\system\Functional\System\ThemeTest was broken on HEAD, the offending commit has been reverted, #3215044: Promote the non-stable statuses in admin/appearance page, optionally even visually.
Comment #64
spokjeThanks @quietone!
I also managed to create a failure that I previously resolved, so it's need some TLC anyway.
Doing so now.
Comment #65
quietone commentedNo longer postponed
Comment #66
quietone commentedForgot to change the title for the second time in 20 minutes.
Comment #67
spokjeI think we need to postpone this on #3263618: Deprecate HAL module which needs to go in first.
Comment #68
spokjeAlso postponed on #3264633: Remove \Drupal\layout_builder\QuickEditIntegration and refactor it so that quickedit contrib provides the integration with layout builder (see #3049857-60: Remove HAL module from core and create a contrib project for it).
Added Currently postponed on to IS.
Comment #69
catchSince the deprecation issue is RTBC, this can go in alongside it.
Comment #70
bbralaI've applied this patch when testing 1.0.0 for contrib. This applied and I could use HAL from contrib without a problem after it.
Comment #71
bbralaComment #72
spokjeComment #73
bbralaOnly issue is the composer.lock has of 10.0.x-dev because of the composer.json change. Hopefully this doesn't meana reroll. @larowlan is looking. ;)
Comment #74
spokjeComment #75
danielvezaLooks good to me. Reroll has merged in 10.x & the HAL module is still correctly removed.
RTBC on the assumption tests come back green
Comment #76
larowlancrediting @Gábor Hojtsy and @catch who've put a lot of time into this in slack etc
Comment #77
larowlanAdded a draft change record
Comment #79
larowlanCommitted 85ccd29 and pushed to HEAD. Thanks!
Thanks everyone, especially @Spokje and @bbrala who've championed this
Merged the change record
HAL is dead! Long live HAL¹
¹ in contrib
Comment #80
quietone commentedUpdate the CR to add link to the doc page and added composer instructions to the doc page. The CR mentions JSON as a superset, does that mean it is a replacement? That should be mentioned on the doc page.
Comment #82
spokjeComment #83
wim leers🥳
Comment #85
dhirendra.mishra commentedComment #86
xjmThere's more than one!
Comment #87
xjm