Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## Unreleased

### Dependencies

- Bump CLI from v2.52.0 to v3.0.1 ([#354](https://github.com/getsentry/sentry-dart-plugin/pull/354))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#301)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.52.0...3.0.1)

## 3.2.0

### Features
Expand Down
14 changes: 7 additions & 7 deletions lib/src/cli/_sources.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ import 'package:sentry_dart_plugin/src/cli/sources.dart';

import 'host_platform.dart';

const _version = '2.52.0';
const _version = '3.0.1';
Copy link

Choose a reason for hiding this comment

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

Bug: Legacy sourcemap upload breaks with removed CLI command

Bumping sentry-cli to v3.0.1 breaks the legacy_web_symbolication feature. The _executeCliForLegacySourceMaps method invokes releases files <release> upload-sourcemaps, but sentry-cli 3.0.0 removed all releases files ... subcommands. Users with legacy_web_symbolication: true configured will get runtime failures because the CLI command they depend on no longer exists.

Fix in Cursor Fix in Web


final currentCLISources = {
HostPlatform.darwinUniversal: CLISource(
Copy link

Choose a reason for hiding this comment

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

Bug: The plugin uses the files subcommand, which was removed in sentry-cli 3.0.1. This will break builds for users with legacy_web_symbolication: true.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The PR upgrades the embedded sentry-cli to version 3.0.1, which removes the files subcommand. However, the plugin's _executeCliForLegacySourceMaps() method still constructs commands using this removed subcommand when the legacy_web_symbolication option is enabled. This will cause the build process to fail with an unrecognized command error for any user who has this legacy option enabled, breaking their upgrade path without warning.

💡 Suggested Fix

Update the command generation logic in _executeCliForLegacySourceMaps() to align with the new command structure of sentry-cli 3.0.1. Alternatively, if the feature is no longer supported, add a deprecation warning and prevent its use with the new CLI version to avoid build failures.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: lib/src/cli/_sources.dart#L10

Potential issue: The PR upgrades the embedded `sentry-cli` to version 3.0.1, which
removes the `files` subcommand. However, the plugin's `_executeCliForLegacySourceMaps()`
method still constructs commands using this removed subcommand when the
`legacy_web_symbolication` option is enabled. This will cause the build process to fail
with an unrecognized command error for any user who has this legacy option enabled,
breaking their upgrade path without warning.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7682739

'sentry-cli-Darwin-universal',
_version,
'd2e49a13bc253044dd8bc4bc822ca255ad8b3353488378e6ded1d5483cfad835',
'720af732451032b5be7df75baacc313ea21ee645f9ad4872d0a39524db274981',
),
HostPlatform.linuxAarch64: CLISource(
'sentry-cli-Linux-aarch64',
_version,
'1db6a70093828bd3a017f585a2717e83ffb01f2aee671900669ae49de5261c4f',
'5eaa180ae11e63af80cab6303a8d223dddb7dcea7c0a7c933b26fa91b54c9cf6',
),
HostPlatform.linuxArmv7: CLISource(
'sentry-cli-Linux-armv7',
_version,
'befa94bb905487b58c7914ccd8ab137407b782f45b7d3ceb2f269fc94375e4c7',
'3dc9cb18e302db1bd1c7c6edb2cdbe0fe250ab4b815787f551a07553b692e42b',
),
HostPlatform.linux64bit: CLISource(
'sentry-cli-Linux-x86_64',
_version,
'6149cf765590ef5adf2e8bc47ca236ba9100b38d600dd148b3bc435693c7e6a5',
'7cf53a2089fd5a6a9a0c2eb972d62c9c8eefea19dcdd5dd58604aa8bc4212538',
),
HostPlatform.windows32bit: CLISource(
'sentry-cli-Windows-i686.exe',
_version,
'0b6937ee44415120344815fc7f356659477d6a91ca8b5af11be26e9426605c92',
'e691b753e7477bc7ec72cd7b8149e34ef52754cbbcb774823c885576215f4683',
),
HostPlatform.windows64bit: CLISource(
'sentry-cli-Windows-x86_64.exe',
_version,
'426c2a90da4235265c8f31088c393460691be4bd54d2c3a2f1bc7dbf210794b3',
'a85b00f651ae73c345a75788378f31b210226193d54e421fe2d3974392af591b',
),
};