Would it be OK to make the library module a hard dependency?

This would allow to simplify the code and avoid some duplication, for example right now _syntaxhighlighter_scan_lib_location() basically duplicates what libraries_get_path() does.

This would make even more sense long-term if we register the syntaxhihglighter external library with the Libraries Registry project.

I also have a doubt about caching syntaxhighlighter_lib_location in a variable, does this bring an actual benefit?
Scanning for the path on the filesystem for the library location only happens in a few places in the code, and most hooks implementations should be already cached by Drupal.

Comments

ao2 created an issue. See original summary.

ao2’s picture

Ping.

If nobody objects I'll go ahead and make the library module a hard dependency.

fizk’s picture

Sounds like a good idea to me, Antonio!

  • ao2 committed 0b5df62 on 8.x-1.x
    Issue #2881252: Make the libraries module a hard dependency
    
    By making...
ao2’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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