fix: declare plugins.sentry plural mapping so vendor install works#3
Merged
Merged
Conversation
…works
`wheels packages add wheels-sentry` installs into `vendor/wheels-sentry/`, but
`Sentry.cfc:79` still instantiates `new plugins.sentry.SentryClient(...)`. That
dotted path only resolves when the package is hand-installed into the legacy
`plugins/sentry/` directory, so `initSentry()` silently caught a class-not-found
error and `application.sentry` was never populated.
Declare `"mappings": {"plugins.sentry": "."}` in `package.json`. At load time
the framework's `PackageLoader.cfc` (wheels-dev/wheels#2705) registers
`/plugins/sentry` against the install directory, so the existing callsite
resolves with no application or framework changes. Also bumps the minimum
`wheelsVersion` requirement to 4.0 in README and refreshes the install
instructions to use `wheels packages add`.
Fixes wheels-dev/wheels#2705.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Amiri <peter@alurium.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"mappings": {"plugins.sentry": "."}in package.json sowheels packages add wheels-sentryproduces a working install. Without this, the auto-init mixin'snew plugins.sentry.SentryClient(...)on Sentry.cfc:79 silently failed (caught by the surrounding try/catch ininitSentry()) because the dotted path only resolved when the package was hand-installed intoplugins/sentry/.versionto1.0.1and refreshes README.md install instructions to usewheels packages add. Removes the now-defunctset(overwritePlugins=false)guidance since the package no longer lives inplugins/.Fixes wheels-dev/wheels#2705.
How the fix works
At load time, the framework's vendor/wheels/PackageLoader.cfc reads the
mappingsblock and registersapplication.mappings["/plugins/sentry"]→vendor/wheels-sentry/. The existingSentry.cfc:79callsite resolves against that mapping with no application-side changes.The plural
mappingsfield was added in wheels-dev/wheels#2705 (merged as commit 9293ec5a02), which is why this fix bumps the minimumwheelsVersionto>=4.0.Test plan
wheels new sentryapp && cd sentryapp && wheels packages add wheels-sentry— verifyvendor/wheels-sentry/exists.SENTRY_DSN=https://test@example/1 wheels startand confirm the application log showswheels-sentry initializedrather than the silent-fail path.sentryCapture(e)and verifyapplication.sentryis a populated component (not undefined).🤖 Generated with Claude Code