Title: Send the IDE plugin's errors to the JetBrains Marketplace by abashev · Pull Request #199 · openjavaformat/open-java-format · GitHub
Open Graph Title: Send the IDE plugin's errors to the JetBrains Marketplace by abashev · Pull Request #199 · openjavaformat/open-java-format
X Title: Send the IDE plugin's errors to the JetBrains Marketplace by abashev · Pull Request #199 · openjavaformat/open-java-format
Description: Before this PR When the IDE plugin failed, nobody could tell us. The IDE puts an error down to a plugin when its stack trace runs through the plugin's classes, and offers Report only for a plugin that names an error handler. This one named none, so the IDE Internal Errors dialog showed the plugin's errors with Report switched off. The error that mattered most did not reach that dialog at all: the formatter failing to run, its process not starting or exiting with an error, was logged as a warning. After this PR ==COMMIT_MSG== The IDE plugin sends its errors to the Exceptions tab of its page on the JetBrains Marketplace, with the OS, the IDE's and the plugin's versions and the full stack trace. A release IDE sends them only when the user lets it send error reports automatically, and no longer shows them to the user; EAP builds show them with Report. ==COMMIT_MSG== plugin.xml registers com.intellij.diagnostic.JetBrainsMarketplaceErrorReportSubmitter as the plugin's errorHandler, as the Marketplace docs describe. The class has been in the platform since 2023.3, so 2024.2, the oldest IDE the plugin supports, has it. What a release IDE does with it, read from the bytecode of IC-242.26775.15 and IU-263.7307.200. A release IDE sets idea.fatal.error.notification=disabled. With that setting, the error indicator shows a plugin's error only when the plugin's submitter is not an ITNReporter, or when the reporter's showErrorInRelease returns true. JetBrainsMarketplaceErrorReportSubmitter extends ITNReporter and does not override showErrorInRelease, which returns false. A report from a release IDE is sent automatically, without a dialog. The automatic sending (ExceptionAutoReportUtil) checks for this exact class, so a subclass that showed the errors would not get it, and IC-242 has no automatic sending at all. Logging: the formatter failing to run, the RuntimeException branch of PalantirJavaFormatFormattingService, is now logger.error, so it goes into a report. The user still gets the plugin's own notification, which points to idea.log. A FormatterException, a syntax error in the user's file, is now logger.warn, so it does not fill the reports. Neither formatter the plugin runs throws it today: both return no replacements on a syntax error. How it was checked ./gradlew :open-java-format-idea-plugin:test: 64 tests, all pass. ./gradlew :open-java-format-idea-plugin:verifyPlugin: compatible with IC-242 and IU-263. The deprecated and experimental TrustedProjects usages it reports were there before this PR. A throwaway test, not committed, ran in the plugin's test IDE (IC-242). It confirmed that IdeErrorsDialog.getSubmitter(throwable, PluginId.getId("open-java-format")) returns JetBrainsMarketplaceErrorReportSubmitter with this plugin's descriptor, that its action is "Report to the Third-Party Plugin", and that showErrorInRelease is false. Possible downsides? In a release IDE users no longer see the red indicator for this plugin's errors, which they saw before, Report switched off. When the formatter fails to run, they still get the plugin's notification. Reports arrive only from users who let the IDE send error reports automatically, and from EAP builds; none arrive from release 2024.2. A user cannot attach a comment or a way to reach them, since the dialog does not open in a release IDE. A formatter that fails on every Reformat, such as a build classpath the formatter cannot run, now logs an error each time. The Marketplace groups them as one issue.
Open Graph Description: Before this PR When the IDE plugin failed, nobody could tell us. The IDE puts an error down to a plugin when its stack trace runs through the plugin's classes, and offers Report only for a plug...
X Description: Before this PR When the IDE plugin failed, nobody could tell us. The IDE puts an error down to a plugin when its stack trace runs through the plugin's classes, and offers Report only for a ...
Opengraph URL: https://github.com/openjavaformat/open-java-format/pull/199
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f0733510-679f-df2f-944e-167f8edded46 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9956:1D8DF0:61B7A0:818001:6AFBC76A |
| html-safe-nonce | 063d781b110df1ef375451535417857a0b580190588dbc56310ce473f4c94ae1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTU2OjFEOERGMDo2MUI3QTA6ODE4MDAxOjZBRkJDNzZBIiwidmlzaXRvcl9pZCI6IjU3OTgzNTQxMDA3ODEwNDE1MTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cb2ea7b2693334562491276d70e81384c8d4766d6be66f77e8b62545620fdd42 |
| hovercard-subject-tag | pull_request:5210788377 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/openjavaformat/open-java-format/pull/199/files |
| twitter:image | https://avatars.githubusercontent.com/u/214171?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/214171?s=400&v=4 |
| og:image:alt | Before this PR When the IDE plugin failed, nobody could tell us. The IDE puts an error down to a plugin when its stack trace runs through the plugin's classes, and offers Report only for a plug... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d440bda0d812801778b27bfe9f7c1ce9ff22420c73f6f95150c4fcbca311c50b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/openjavaformat/open-java-format git https://github.com/openjavaformat/open-java-format.git |
| octolytics-dimension-user_id | 325177626 |
| octolytics-dimension-user_login | openjavaformat |
| octolytics-dimension-repository_id | 1288055459 |
| octolytics-dimension-repository_nwo | openjavaformat/open-java-format |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 214273098 |
| octolytics-dimension-repository_parent_nwo | palantir/palantir-java-format |
| octolytics-dimension-repository_network_root_id | 214273098 |
| octolytics-dimension-repository_network_root_nwo | palantir/palantir-java-format |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2c43021aed8695990c86c0eaaedc600bfeffec36 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width