Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workaround for IDEA-317606 #10322

Merged
merged 6 commits into from
Sep 6, 2023
Merged

Add workaround for IDEA-317606 #10322

merged 6 commits into from
Sep 6, 2023

Conversation

koppor
Copy link
Member

@koppor koppor commented Sep 4, 2023

When starting from scratch in IntelliJ, one might see java.lang.IllegalStateException: Module entity with name: jabref.main should be available. See IDEA-317606 for details.

This PR adds a work around (update): by changing settings.gradle.

The underlying issue is that in settings.gradle, we currently have JabRef as project name. However, our source repository is called jabref, which is not the same casing. This started to confuse IntelliJ.

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@koppor koppor marked this pull request as draft September 4, 2023 19:05
@koppor
Copy link
Member Author

koppor commented Sep 4, 2023

Still not working:

grafik

@koppor
Copy link
Member Author

koppor commented Sep 4, 2023

Closed IntelliJ, deleted .intellij folder and restarted IntelliJ (as recommended by https://youtrack.jetbrains.com/issue/IDEA-317606/Changing-only-the-case-of-the-Gradle-root-project-name-causes-exception-while-importing-project-java.lang.IllegalStateException#focus=Comments-27-7257761.0-0)

Works now

I would more like to use jabref as global configuration name - as we have the branding "JabRef" coded differently in our sources, don't we?

-rootProject.name = "JabRef"
+rootProject.name = "jabref"

@Siedlerchr
Copy link
Member

not sure if this will affect our installer/deployment scripts etc

@koppor
Copy link
Member Author

koppor commented Sep 4, 2023

not sure if this will affect our installer/deployment scripts etc

Maybe we just try in this PR? -- I pushed the change in settings.gradle. Let's see how the binaries behave.

@koppor
Copy link
Member Author

koppor commented Sep 6, 2023

not sure if this will affect our installer/deployment scripts etc

The application name is NOT reused from there, but hard coded in the launcher part of jlink:

name = 'JabRef'

(Documentation at https://badass-jlink-plugin.beryx.org/releases/latest/ -> section "Launcher")

@koppor
Copy link
Member Author

koppor commented Sep 6, 2023

I checked the build portable version locally - works fine:

image

This is good. If the branding of our applicatian relied on some gradle configuration, I would find that strange. (Changing the name to CloudRef via a single line?)

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

Siedlerchr
Siedlerchr previously approved these changes Sep 6, 2023
@koppor koppor marked this pull request as ready for review September 6, 2023 14:53
@koppor koppor disabled auto-merge September 6, 2023 15:15
@koppor koppor merged commit 5a3dc4e into main Sep 6, 2023
8 of 11 checks passed
@koppor koppor deleted the refine-intellij-howto branch September 6, 2023 15:15
@Siedlerchr Siedlerchr restored the refine-intellij-howto branch September 6, 2023 16:13
Siedlerchr added a commit that referenced this pull request Sep 6, 2023
@koppor koppor mentioned this pull request Sep 7, 2023
6 tasks
Siedlerchr added a commit that referenced this pull request Sep 7, 2023
…nto fix-dependency-conflicts

* 'fix-dependency-conflicts' of github.com:JabRef/jabref:
  test updating javafx plugin but throws at runtime
  Revert "Add workaround for IDEA-317606 (#10322)"
  Add workaround for IDEA-317606 (#10322)
  New Crowdin updates (#10335)
  Add change in en.properties as well
  Correction of a typo in LinkedFileViewModel.java
  Fix devcontainer prebuilds (#10333)
  Add requires on org.freedesktop.dbus (#10332)
  Fix hint to menu
@koppor koppor mentioned this pull request Sep 7, 2023
6 tasks
@koppor koppor deleted the refine-intellij-howto branch September 12, 2023 10:53
@koppor
Copy link
Member Author

koppor commented Oct 25, 2023

Note that the proejct name change was reverted in 08a7f8d as hotfix. I don't remember the reasons excactly, but the macOS build was not working any more.

I tried to redo at #10345, but macOS still did not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants