The story json generation should skip symlinks.

Created on 23 April 2024, 2 months ago
Updated 2 May 2024, about 2 months ago

Problem/Motivation

This may be only an issue for me I get that. I personally make a symlink called components that points to where I have all my source files which includes all my sdc alongside other things I consider source. Anyway when the generator runs it looks in the symlink and doesn't know what to do and throws and error.

Proposed resolution

When scanning directories can we skip anything thats a link.

// scanDirectory in foreach line 85ish
    // Skip if file is a symbolic link
      if (is_link($file)) {
        continue;
      }
✨ Feature request
Status

Active

Version

1.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States brayn7 Lexington, Ky

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @brayn7
  • Merge request !8Skip symlinks β†’ (Open) created by brayn7
  • Pipeline finished with Success
    2 months ago
    Total: 139s
    #154492
  • πŸ‡ΊπŸ‡ΈUnited States ashooner

    There are a couple of us on Drupal slack that want to get symlinks working for the Storybook module, and this issue came up. Could you clarify your use case? If you are referring to you SDC components via symlink, it seems like you'd want the module to follow symlinks. There are definitely a few parts of the module and underlying libraries that are written to exclude symlinked files. From what I've seen, it looks like on of the iterators being used just doesn't know how to handle symlinked directories, and that's what is causing the error.

    Changing line ~92 to:
    $it = new \RecursiveIteratorIterator($filter, \RecursiveIteratorIterator::LEAVES_ONLY, $flags);

    got past the immediate error, but then you run into the rest of the code not expected symlinked paths.

Production build 0.69.0 2024