Conversation
|
| class ConfigFormatter { | ||
| static String formatConfig( | ||
| String config, ConfigFileType fileType, String? url) { | ||
| // Add URL if provided | ||
| if (url != null) { | ||
| config = _addUrlPrefix(config, fileType, url); | ||
| String config, | ||
| ConfigFileType fileType, | ||
| String? url, | ||
| ) { | ||
| if (url?.isNotEmpty == true) { | ||
| config = _addUrlPrefix(config, fileType, url!); |
There was a problem hiding this comment.
eventually we should rewrite the test to not rely on things like normalizing the pubspec and properties file to a string.
adding more and more business logic to test code is generally not good
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Internal Changes 🔧Release
Other
Other
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
Pull request overview
Adds support for configuring a web-specific ignore list so unwanted files/directories can be excluded when uploading Flutter Web sourcemaps and (optionally) sources, addressing #329.
Changes:
- Introduces
ignore_web_source_pathsconfig (args + pubspec.yaml + sentry.properties) and threads it throughConfiguration. - Adds
--ignoreflags to thesentry-cli sourcemaps uploadinvocation and uses glob matching to exclude ignored files during web file enumeration. - Updates tests and changelog to cover/document the new configuration.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/utils/config_formatter.dart | Enhances test-only config formatting to support list-like values for properties/yaml fixtures. |
| test/plugin_test.dart | Asserts --ignore is appended to the sourcemaps upload command when configured. |
| test/configuration_values_test.dart | Adds coverage for parsing ignore_web_source_paths from args, yaml, and properties. |
| test/configuration_test.dart | Verifies merged configuration exposes ignoreWebSourcePaths with correct precedence/defaults. |
| pubspec.yaml | Adds glob dependency for ignore-pattern matching. |
| lib/src/utils/config-reader/yaml_config_reader.dart | Adds getList support for YAML list values. |
| lib/src/utils/config-reader/properties_config_reader.dart | Adds getList support for comma-separated values in properties. |
| lib/src/utils/config-reader/no_op_config_reader.dart | Implements getList returning null. |
| lib/src/utils/config-reader/fallback_config_reader.dart | Adds getList delegation to primary/fallback readers. |
| lib/src/utils/config-reader/config_reader.dart | Extends ConfigReader interface with getList. |
| lib/src/configuration_values.dart | Adds ignoreWebSourcePaths to config values + parsing from args/readers/merge. |
| lib/src/configuration.dart | Stores ignoreWebSourcePaths on loaded configuration with default []. |
| lib/sentry_dart_plugin.dart | Adds glob-based ignore filtering for web file enumeration + passes --ignore to sourcemaps upload. |
| CHANGELOG.md | Documents the new ignore_web_source_paths feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
- Filter empty strings after comma-split in `fromArguments` and `getList` to handle trailing commas gracefully - Strip bracket syntax (`[`/`]`) in `PropertiesConfigReader.getList` so users can write `key=[a, b]` in sentry.properties without breaking Glob Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@sentry review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Normalize backslash path separators to forward slashes before glob matching to ensure ignore patterns work cross-platform - Add doc comment to ignoreWebSourcePaths for consistency with other configuration fields Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

📜 Description
Adds support for ignoring files and directories when uploading sourcemaps and sources for Flutter Web
💡 Motivation and Context
Closes #329
💚 How did you test it?
📝 Checklist
🔮 Next steps