Skip to content

feat: add native BoxLang 1.8.0+ dynamic class loading support#25

Merged
lmajano merged 4 commits into
developmentfrom
claude/full-code-analysis-65BUo
Mar 31, 2026
Merged

feat: add native BoxLang 1.8.0+ dynamic class loading support#25
lmajano merged 4 commits into
developmentfrom
claude/full-code-analysis-65BUo

Conversation

@lmajano
Copy link
Copy Markdown
Contributor

@lmajano lmajano commented Mar 31, 2026

  • Understand new review comments from @lmajano
  • setup() (line 37): remove server scope storage and lock for BoxLang – just call getRequestClassLoader().addPaths() directly
  • appendPaths() (line 89): remove server scope and lock for BoxLang – just use the loader directly
  • getLoadedURLs() (line 134): get loaded URLs directly from the class loader, not from server scope
  • getVersion() (line 165): remove the BoxLang-specific "boxlang-native" version string, use the same version as non-BoxLang path
  • Code review and security check

claude added 2 commits March 30, 2026 19:50
When running on BoxLang 1.8.0+, bypass JavaLoader entirely and delegate
to BoxLang's built-in getRequestClassLoader().addPaths() / createObject()
APIs, eliminating URLClassLoader overhead and server-scope caching.

- ModuleConfig: skip jl@cbjavaloader binding and cfcdynamicproxy.jar
  prepend on BoxLang (neither is needed with native class loading)
- Loader: add isBoxLangNative() helper (cached, probed via try/catch)
  and BoxLang branches in setup(), create(), appendPaths(),
  getLoadedURLs(), getURLClassLoader(), getVersion()
- LoaderTest: adjust expected URL count (1 on BoxLang, 2 on CF/Lucee)

Falls back gracefully to JavaLoader on BoxLang < 1.8.0 if addPaths()
is unavailable.

https://claude.ai/code/session_01G5FaLgYNxWeRijMwPryJj8
Remove the try/catch version probe. BoxLang is always current so a
simple server.boxlang struct key check is sufficient.

https://claude.ai/code/session_01G5FaLgYNxWeRijMwPryJj8
Copilot AI review requested due to automatic review settings March 31, 2026 08:50
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

lucee@6 ColdBox be Test Results

4 tests  ±0   4 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit f0f88eb. ± Comparison against base commit 3ec97ff.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

lucee@5 ColdBox be Test Results

4 tests  ±0   4 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit f0f88eb. ± Comparison against base commit 3ec97ff.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

lucee@6 ColdBox ^7.0.0 Test Results

4 tests  ±0   4 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 920c457. ± Comparison against base commit 3ec97ff.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

lucee@5 ColdBox ^7.0.0 Test Results

4 tests  ±0   4 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit f0f88eb. ± Comparison against base commit 3ec97ff.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

boxlang-cfml@1 ColdBox be Test Results

4 tests  ±0   2 ✅  - 2   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0   2 🔥 +2 

For more details on these errors, see this check.

Results for commit 920c457. ± Comparison against base commit 3ec97ff.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

boxlang@1 ColdBox be Test Results

4 tests  ±0   2 ✅  - 2   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0   2 🔥 +2 

For more details on these errors, see this check.

Results for commit 920c457. ± Comparison against base commit 3ec97ff.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

boxlang-cfml@1 ColdBox ^7.0.0 Test Results

4 tests  ±0   2 ✅  - 2   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0   2 🔥 +2 

For more details on these errors, see this check.

Results for commit 920c457. ± Comparison against base commit 3ec97ff.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

adobe@2025 ColdBox be Test Results

4 tests  ±0   4 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 920c457. ± Comparison against base commit 3ec97ff.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

adobe@2025 ColdBox ^7.0.0 Test Results

4 tests  ±0   4 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 920c457. ± Comparison against base commit 3ec97ff.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

adobe@2023 ColdBox ^7.0.0 Test Results

4 tests  ±0   4 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 920c457. ± Comparison against base commit 3ec97ff.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a BoxLang-native code path to cbjavaloader so BoxLang runtimes can use the built-in request class loader APIs instead of JavaLoader, while keeping the existing JavaLoader behavior for CF/Lucee.

Changes:

  • Conditionalize jl@cbjavaloader binding and cfcdynamicproxy.jar prepending based on BoxLang detection.
  • Add BoxLang-native branches in models/Loader.cfc for setup, class creation, path appending, and URL reporting.
  • Update the Loader test expectation for loaded URL count on BoxLang vs CF/Lucee.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
ModuleConfig.cfc Skips JavaLoader binding and dynamic-proxy jar on BoxLang runtimes.
models/Loader.cfc Implements BoxLang-native class loading branches and a BoxLang detection helper.
test-harness/tests/specs/LoaderTest.cfc Adjusts expected loaded URL count for BoxLang vs CF/Lucee.

Comment thread models/Loader.cfc
Comment thread models/Loader.cfc Outdated
Comment thread models/Loader.cfc
Comment thread ModuleConfig.cfc Outdated
Comment thread test-harness/tests/specs/LoaderTest.cfc
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread models/Loader.cfc Outdated
Comment thread models/Loader.cfc Outdated
Comment thread models/Loader.cfc Outdated
Comment thread models/Loader.cfc Outdated
@lmajano lmajano merged commit 805a053 into development Mar 31, 2026
18 of 26 checks passed
@lmajano lmajano deleted the claude/full-code-analysis-65BUo branch March 31, 2026 10:03
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.

4 participants