Problem/Motivation

After working on #2281429: [js] D8 Port for lengthy amount of time today, I finally got to a good enough stopping point where I felt it was safe to finally "enable" the module. Much to my surprise: the module couldn't be "found".

I spent a ton of time trying to figure out if it was a file permission issue, symlink issue, parse issue... only to finally remember that there was a "blacklist" somewhere that may be causing me grief.

Sure enough, this valid D7 module cannot be ported using the same name because the entire directory is skipped. This is a major problem considering the namespace (on d.o) is already being used.

Yes, I read the doc comment:

  /**
   * List of directory names to skip when recursing.
   *
   * These directories are globally ignored in the recursive filesystem scan;
   * i.e., extensions (of all types) are not able to use any of these names,
   * because their directory names will be skipped.
   *
   * @var array
   */

However, that is a really... really stupid "reason".

Especially considering the "fix" is really simple: just check if there's an immediate .info.yml file directly inside it.

Before anyone tells me to "just rename the module", that isn't an option. I don't want to have to try and come up with a new "name" when all the code (in 7.x) and the stuff I just did in 8.x centers around "js". It'll make backporting a PITA.

Proposed resolution

Loosen blacklist to allow modules that have an .info.yml directly inside the folder that's blacklisted.

Remaining tasks

  • Create a patch
  • Create tests

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#2 2839191-2.patch2 KBmarkhalliwell

Comments

markcarver created an issue. See original summary.

markhalliwell’s picture

Status: Active » Needs review
Issue tags: +needs backport to 8.2.x
StatusFileSize
new2 KB

Status: Needs review » Needs work

The last submitted patch, 2: 2839191-2.patch, failed testing.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

markhalliwell’s picture

Priority: Major » Critical

Escalating to critical, if only to gain attention and feedback after half a year...

Please feel free to deescalate.

mile23’s picture

Version: 8.4.x-dev » 8.3.x-dev
Status: Needs work » Reviewed & tested by the community
Issue tags: -needs backport to 8.2.x +Needs Drupal 8 critical triage

If this is a critical, then it's a critical in 8.3.x, unless you want to wait a year before anyone can install the js module... I think this issue might be critical in that it disallows contrib development for existing projects without a reasonable workaround. Adding the 'needs critical triage' tag to get another opinion.

So we avoid js directories for speed reasons, which is reasonable. But it's also a problem if an extension name is in the blacklist. So therefore checking whether it's an extension is also reasonable. It adds a single file_exists() per blacklisted directory name, but this is still better than a full recursive scan of the entire directory.

The patch still applies to 8.3.x, and allows the js module to be discovered.

catch’s picture

Priority: Critical » Major
Status: Reviewed & tested by the community » Needs work

The patch fails, so it can't be RTBC, it could also use some test coverage (i.e. a test module matching a blacklist directory and see if it can be found).

This isn't critical, since renaming the module is an obvious workaround (if not a pleasant one), but checking for .info.yml in the blacklisted directory might be OK. Main question I have is whether this means the js module is then prevented from ever having a submodule, or does the .info.yml presence allow the scan to go a further directory level down?

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andypost’s picture

Version: 8.6.x-dev » 8.8.x-dev
Issue tags: +Needs tests

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

markhalliwell’s picture

Status: Needs work » Closed (won't fix)
Issue tags: -Contributed project blocker, -D8 upgrade path, -Needs Drupal 8 critical triage, -Needs tests

I'm just going to close this. It's been years since I've opened it and a D8 port of this module is likely never to happen since D8 has rest and jsonapi now.