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

  1. Find someone to volunteer to maintain HAL in contrib. We have had troubles finding a maintainer for HAL in core for a while.
  2. 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.
  3. 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.

CommentFileSizeAuthor
#50 hal-module-references-in-core.png58.64 KBbbrala

Issue fork drupal-3049857

Command icon 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

e0ipso created an issue. See original summary.

e0ipso’s picture

Status: Active » Postponed
wim leers’s picture

jibran’s picture

If we are moving forward with this then we should create https://www.drupal.org/project/hal ASAP before someone else get some other ideas.

Version: 9.x-dev » 9.0.x-dev

The 9.0.x branch will open for development soon, and the placeholder 9.x branch should no longer be used. Only issues that require a new major version should be filed against 9.0.x (for example, removing deprecated code or updating dependency major versions). New developments and disruptive changes that are allowed in a minor version should be filed against 8.9.x, and significant new features will be moved to 9.1.x at committer discretion. For more information see the Allowed changes during the Drupal 8 and 9 release cycles and the Drupal 9.0.0 release plan.

xjm’s picture

Version: 9.0.x-dev » 9.1.x-dev
Status: Postponed » Active

This 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.

xjm’s picture

Title: [PP-1] Remove HAL module from core and create a contrib project for it » Remove HAL module from core and create a contrib project for it
xjm’s picture

Mmm, also would need product signoff. FWIW I'm +1 (but not a product manager).

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

gábor hojtsy’s picture

I 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.

gábor hojtsy’s picture

Status: Active » Postponed
catch’s picture

Status: Postponed » Active
Issue tags: +Drupal 10

I think this can be unpostponed now that #3124762: Add 'lifecycle' key to .info.yml files has landed.

larowlan’s picture

Happy to maintain it in contrib given entity pilot depends on it for the time being

andypost’s picture

@larowlan please create https://www.drupal.org/project/hal

larowlan’s picture

andypost’s picture

Next step probably is to mark the module obsolete or just try to remove it?

Spokje made their first commit to this issue’s fork.

spokje’s picture

Status: Active » Needs review
Issue tags: +Needs release note

Next step probably is to mark the module obsolete or just try to remove it?

Thus spoketh @andypost in #17.

I think even putting this module on lifecycle: obsolete might 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: deprecated and lifecycle: obsolete for later/D10?

If that is indeed the case: MR!830 is your friend.
(Also tagged with Needs release note)

catch’s picture

It 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).

longwave’s picture

Agree 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.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

spokje’s picture

- Changed MR!830 for marking Core Module lifecycle: deprecate from 9.3.x => 9.4.x
- Merged latest commits

spokje’s picture

Would 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?

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Marking 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.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Postponed

Thanks 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.

dhirendra.mishra made their first commit to this issue’s fork.

spokje’s picture

Thanks @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.x instead of 9.4.x brings to the table TBH...

spokje’s picture

Title: Remove HAL module from core and create a contrib project for it » [PP-2] Remove HAL module from core and create a contrib project for it
Status: Reviewed & tested by the community » Postponed

(Grmbl)

Restoring issue status.

spokje’s picture

Title: [PP-2] Remove HAL module from core and create a contrib project for it » [PP-1] Remove HAL module from core and create a contrib project for it
catch’s picture

Title: [PP-1] Remove HAL module from core and create a contrib project for it » Remove HAL module from core and create a contrib project for it
catch’s picture

Status: Postponed » Needs review
bbrala’s picture

This should only need a release note snippet, then i think we can RTBC.

bbrala’s picture

Issue summary: View changes
spokje’s picture

I agree with the need for a release note, but the current MR (MR!830) would (at the very least) need a lifecycle_link entry 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.

bbrala’s picture

Issue tags: -Needs release note

In #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.

spokje’s picture

In #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?

Ah, 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.

catch’s picture

It'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.

bbrala’s picture

Ok that sounds good. I'll do the following:

  1. This issue should be about the removal.
  2. I'll make a child issue for the deprecation change and add a merge request.
  3. I'll post in #contribute to get a rtbc on that (and ping spokje, he might come online soon ;))
bbrala’s picture

catch’s picture

We 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

bbrala’s picture

I'll ping larowlan since he created the hal project

spokje’s picture

Version: 9.4.x-dev » 10.0.x-dev

This issue should be about the removal.

Thus spoketh @bbrala in #42

- Closed deprecation D9.4.x MR
- Upped version to 10.0.x-dev

spokje’s picture

New MR (MR!1800) against 10.0.x-dev with the "fun part" of removal:

- Removal of core/modules/hal
- COMPOSER_ROOT_VERSION=10.0.x-dev composer update drupal/core -vvv

Lets see what breaks...

bbrala’s picture

StatusFileSize
new58.64 KB

A lot will break, i've just checked references to the string 'hal'in core. 135 results.

Mostly in tests except: rest.module which appearantly suggests HAL in it's help.

HAL module in core

spokje’s picture

@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\hal namespace 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 move core/modules/hal into its own Contrib module and be sure all is on board.

bbrala’s picture

There 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

catch’s picture

Moving 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.

bbrala’s picture

Actually 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

spokje’s picture

Title: Remove HAL module from core and create a contrib project for it » [PP-1] Remove HAL module from core and create a contrib project for it
Status: Needs review » Postponed
spokje’s picture

Module and theme removals should always be tagged for the release notes. Thanks!

Thus spoketh @xjm in [#2966859-32]

catch’s picture

Issue tags: +10.0.0 release notes
bbrala’s picture

Title: [PP-1] Remove HAL module from core and create a contrib project for it » [Remove HAL module from core and create a contrib project for it
Status: Postponed » Active

Blocker got committed :)

bbrala’s picture

Title: [Remove HAL module from core and create a contrib project for it » Remove HAL module from core and create a contrib project for it
spokje’s picture

Title: Remove HAL module from core and create a contrib project for it » [PP-1 Remove HAL module from core and create a contrib project for it
spokje’s picture

Title: [PP-1 Remove HAL module from core and create a contrib project for it » [PP-1] Remove HAL module from core and create a contrib project for it
spokje’s picture

quietone’s picture

The 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.

spokje’s picture

Thanks @quietone!

I also managed to create a failure that I previously resolved, so it's need some TLC anyway.
Doing so now.

quietone’s picture

Issue summary: View changes

No longer postponed

quietone’s picture

Title: [PP-1] Remove HAL module from core and create a contrib project for it » Remove HAL module from core and create a contrib project for it

Forgot to change the title for the second time in 20 minutes.

spokje’s picture

Title: Remove HAL module from core and create a contrib project for it » [PP-1] Remove HAL module from core and create a contrib project for it
Status: Active » Postponed

I think we need to postpone this on #3263618: Deprecate HAL module which needs to go in first.

spokje’s picture

catch’s picture

Title: [PP-2] Remove HAL module from core and create a contrib project for it » Remove HAL module from core and create a contrib project for it
Status: Postponed » Needs review

Since the deprecation issue is RTBC, this can go in alongside it.

bbrala’s picture

Status: Needs review » Reviewed & tested by the community

I'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.

bbrala’s picture

Status: Reviewed & tested by the community » Needs review
spokje’s picture

Assigned: Unassigned » spokje
Issue tags: -10.0.0 release notes +10.0.0 release note, +Needs reroll
bbrala’s picture

Only 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. ;)

spokje’s picture

danielveza’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. Reroll has merged in 10.x & the HAL module is still correctly removed.

RTBC on the assumption tests come back green

larowlan’s picture

Issue summary: View changes

crediting @Gábor Hojtsy and @catch who've put a lot of time into this in slack etc

larowlan’s picture

Added a draft change record

  • larowlan committed 85ccd29 on 10.0.x
    Issue #3049857 by Spokje, dhirendra.mishra, bbrala, catch, Gábor Hojtsy...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed 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

quietone’s picture

Update 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.

spokje’s picture

Assigned: spokje » Unassigned
wim leers’s picture

🥳

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

dhirendra.mishra’s picture

xjm’s picture

Issue tags: -10.0.0 release note +10.0.0 release notes

There's more than one!

xjm’s picture

Issue summary: View changes