Skip to content

Use recommended project.getService & update sinceBuild to match intellij version#1295

Merged
bulldozer-bot[bot] merged 7 commits into
developfrom
cr/no-deprecated
May 9, 2025
Merged

Use recommended project.getService & update sinceBuild to match intellij version#1295
bulldozer-bot[bot] merged 7 commits into
developfrom
cr/no-deprecated

Conversation

@crogoz
Copy link
Copy Markdown
Contributor

@crogoz crogoz commented May 9, 2025

Before this PR

After the plugin was updated (live-reloadable), I am getting the following error in Intellij:

java.lang.ClassCastException: class com.palantir.javaformat.intellij.PalantirJavaFormatSettings cannot be cast to class com.palantir.javaformat.intellij.PalantirJavaFormatSettings (com.palantir.javaformat.intellij.PalantirJavaFormatSettings is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @fc6a05b; com.palantir.javaformat.intellij.PalantirJavaFormatSettings is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @106bfe72)
	at com.palantir.javaformat.intellij.PalantirJavaFormatSettings.getInstance(PalantirJavaFormatSettings.java:46)
	at com.palantir.javaformat.intellij.PalantirJavaFormatConfigurable.isModified(PalantirJavaFormatConfigurable.java:108)
	at com.intellij.openapi.options.ex.ConfigurableWrapper.isModified(ConfigurableWrapper.java:185)
	at com.intellij.openapi.options.newEditor.SettingsEditor.checkModifiedInternal(SettingsEditor.java:639)
	at com.intellij.openapi.options.newEditor.SettingsEditor.checkModifiedForItem(SettingsEditor.java:634)
	at com.intellij.openapi.options.newEditor.SettingsEditor.checkModified(SettingsEditor.java:623)
	at com.intellij.openapi.options.newEditor.SettingsEditor$6.onSelected(SettingsEditor.java:201)
	at com.intellij.openapi.options.newEditor.OptionsEditorContext$fireSelected$1.process(OptionsEditorContext.kt:43)
	at com.intellij.openapi.options.newEditor.OptionsEditorContext.notify(OptionsEditorContext.kt:92)
	at com.intellij.openapi.options.newEditor.OptionsEditorContext.fireSelected(OptionsEditorContext.kt:41)
	at com.intellij.openapi.options.newEditor.SettingsTreeView.fireSelected(SettingsTreeView.java:475)
	at com.intellij.openapi.options.newEditor.SettingsTreeView.lambda$new$0(SettingsTreeView.java:197)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel

After this PR

  • According to jetbrains issue, we should keep the sinceBuild & intellij version in sync.
  • ServiceManager.getService is deprecated, we should use project.getService instead
    ==COMMIT_MSG==
    Use recommended project.getService & update sinceBuild to match intellij version
    ==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented May 9, 2025

Generate changelog in changelog/@unreleased

What do the change types mean?
  • feature: A new feature of the service.
  • improvement: An incremental improvement in the functionality or operation of the service.
  • fix: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
  • break: Has the potential to break consumers of this service's API, inclusive of both Palantir services
    and external consumers of the service's API (e.g. customer-written software or integrations).
  • deprecation: Advertises the intention to remove service functionality without any change to the
    operation of the service itself.
  • manualTask: Requires the possibility of manual intervention (running a script, eyeballing configuration,
    performing database surgery, ...) at the time of upgrade for it to succeed.
  • migration: A fully automatic upgrade migration task with no engineer input required.

Note: only one type should be chosen.

How are new versions calculated?
  • ❗The break and manual task changelog types will result in a major release!
  • 🐛 The fix changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
  • ✨ All others will result in a minor version release.

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Use recommended project.getService & update sinceBuild to match intellij version

Check the box to generate changelog(s)

  • Generate changelog entry

@crogoz crogoz changed the title Use recommended project.getService(PalantirJavaFormatSettings.class) Use recommended project.getService & update sinceBuild to match intellij version May 9, 2025
@crogoz crogoz requested a review from FinlayRJW May 9, 2025 12:25
@FinlayRJW
Copy link
Copy Markdown
Contributor

👍

@bulldozer-bot bulldozer-bot Bot merged commit 50ae0c8 into develop May 9, 2025
9 checks passed
@bulldozer-bot bulldozer-bot Bot deleted the cr/no-deprecated branch May 9, 2025 12:35
@autorelease3
Copy link
Copy Markdown

autorelease3 Bot commented May 9, 2025

Released 2.66.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants