Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 25, 2025

Single-file components (.cfm/.bxm) were hardcoded to extend cbwire.models.Component, preventing inheritance from custom base classes like BaseWire.

Changes

  • SingleFileComponentBuilder.cfc: Parse // @extends('path.to.BaseWire') annotation from script block, validate path contains only alphanumeric/dots/underscores
  • EmptySingleFileComponent.cfc/.bx: Replace hardcoded extends with {{ EXTENDS_PATH }} placeholder
  • Tests: Added CFML and BoxLang test cases

Usage

<cfoutput>
    <div>Counter: #count#</div>
</cfoutput>

<cfscript>
// @extends('wires.BaseWire')
// @startWire
    data = { "count": 0 };
// @endWire
</cfscript>

Supports single quotes, double quotes, or no quotes. Defaults to cbwire.models.Component when annotation is absent.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • downloads.ortussolutions.com
    • Triggering command: /usr/bin/curl curl -fsSL REDACTED -o /tmp/commandbox.zip (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add the ability to extend other components such as a BaseWire using the // @extends('path.to.BaseWire') comment annotation</issue_title>
<issue_description>There is a limitation currently with single-file components (wires that are defined within either a .bxm or .cfm file) in that you are unable to extend your component/wire with something other than "cbwire.models.Component". This limitation has to do with the face that single file components are parsed and broken up into their separate class/component and template files from the models/SingleFileComponentBuilder.cfc component, and this component always populates extends with "cbwire.models.Component".

We need to add the ability to extend any functionality from a single file component using a syntax similar to the one below.

Single-file component (Counter.cfm)

<cfoutput>
    <div>Counter goes here</div>
</cfoutput>

<cfscript>
// @extends('wires.BaseWire')
// @startWire

// @endWire
</cfscript>

In BoxLang this would be:

<bx:output>
    <div>Counter goes here</div>
</bx:output>

<bx:script>
// @extends('wires.BaseWire')
// @startWire

// @endWire
</bx:script>

If // @extends() is not provided, then we want to keep the existing functionality of extending 'cbwire.models.Component' by default.

</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 25, 2025 03:52
Co-authored-by: grantcopley <1197835+grantcopley@users.noreply.github.com>
Co-authored-by: grantcopley <1197835+grantcopley@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ability to extend components using annotations Add @extends annotation support for single-file components Nov 25, 2025
Copilot AI requested a review from grantcopley November 25, 2025 03:56
@github-actions
Copy link

github-actions bot commented Nov 25, 2025

lucee@5 Test Results

295 tests  +2   273 ✅ +1   5s ⏱️ ±0s
  8 suites ±0    22 💤 +1 
  1 files   ±0     0 ❌ ±0 

Results for commit d91382a. ± Comparison against base commit d98a255.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

lucee@6 Test Results

295 tests  +2   273 ✅ +1   4s ⏱️ ±0s
  8 suites ±0    22 💤 +1 
  1 files   ±0     0 ❌ ±0 

Results for commit d91382a. ± Comparison against base commit d98a255.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

boxlang-cfml@1 Test Results

295 tests  +2   277 ✅ +2   11s ⏱️ ±0s
  8 suites ±0    18 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit d91382a. ± Comparison against base commit d98a255.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

adobe@2023 Test Results

295 tests  +2   273 ✅ +1   6s ⏱️ ±0s
  8 suites ±0    22 💤 +1 
  1 files   ±0     0 ❌ ±0 

Results for commit d91382a. ± Comparison against base commit d98a255.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

adobe@2025 Test Results

295 tests  +2   273 ✅ +1   6s ⏱️ ±0s
  8 suites ±0    22 💤 +1 
  1 files   ±0     0 ❌ ±0 

Results for commit d91382a. ± Comparison against base commit d98a255.

♻️ This comment has been updated with latest results.

@grantcopley grantcopley marked this pull request as ready for review November 25, 2025 06:10
@grantcopley grantcopley merged commit 0f00578 into next Nov 25, 2025
20 checks passed
@grantcopley grantcopley deleted the copilot/add-extendable-components branch November 25, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants