Moving league/commonmark as optional dependency

Created on 31 October 2024, 3 months ago

Problem/Motivation

I'm evaluating the AI module. I'm concerned about it's dependency tree.

Gathering patches for dependencies. This might take a minute.
  - Installing yethee/tiktoken (0.5.1): Extracting archive
  - Installing league/html-to-markdown (5.1.1): Extracting archive
  - Installing nette/utils (v4.0.5): Extracting archive
  - Installing nette/schema (v1.3.2): Extracting archive
  - Installing league/config (v1.2.0): Extracting archive
  - Installing league/commonmark (2.5.3): Extracting archive
  - Installing drupal/key (1.19.0): Extracting archive
  - Installing drupal/ai (1.0.0-beta1): Extracting archive

Due to league/commonmark the following extra dependencies are added:

  • league/config
  • nette/schema
  • nette/utils

This is all for the AiSearchIndexFieldsForm class supporting Search API, and it looks mostly informative for administrative users. It's also for a submodule which may not be used, but is added as a root dependency since Drupal.org doesn't perform subtree splits for submodules.

Proposed resolution

Move league/commonmark to a suggest to enhance the output of AiSearchIndexFieldsForm In buildCheckerChunkTable there can be a class_exists call. If it exists, instatiate a converter. If not, display a message that "markdown can be displayed as HTML if you add league/commonmark"

✨ Feature request
Status

Active

Version

1.0

Component

AI Core module

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

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

Comments & Activities

Production build 0.71.5 2024