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

Migrating to refreshVersions breaks the build #442

Closed
1 task done
marmistrz opened this issue Sep 15, 2021 · 6 comments
Closed
1 task done

Migrating to refreshVersions breaks the build #442

marmistrz opened this issue Sep 15, 2021 · 6 comments

Comments

@marmistrz
Copy link

🐛 Describe the bug

Migrating my project to refreshVersions breaks the build

💣 Steps to reproduce

  1. Clone the following branch: https://github.com/marmistrz/OpenMeteo/tree/deps
  2. Execute gradle refreshVersionsMigrate
  3. Execute gradle build.

Then the build fails with

* What went wrong:
A problem occurred configuring root project 'OpenMeteo'.
> kotlin.KotlinNullPointerException (no error message)

📱 Tech info

@CDRussell
Copy link

I see this happening on a brand new project with basically nothing in it. This looks like a regression on 0.21.0. If i drop back to 0.20.0 this error doesn't happen

@LouisCAD
Copy link
Member

@CDRussell What is the type of project you created, with which IDE and which version if created from a wizard?

@CDRussell
Copy link

CDRussell commented Sep 17, 2021

Created a new Android project using IntelliJ. Think I chose not to create any Activity from the wizard in case that is significant.

Then added the 0.21.0 plug-in and tried to run migration and I get that error message. Changing to 0.20.0 made that error go away.

@LouisCAD
Copy link
Member

Here's the stacktrace that shows where the problem originates:

Caused by: kotlin.KotlinNullPointerException
	at de.fayard.refreshVersions.RefreshVersionsPlugin$Companion.getBundledResourceAsStream(RefreshVersionsPlugin.kt:23)
	at de.fayard.refreshVersions.RefreshVersionsPlugin$Companion.access$getBundledResourceAsStream(RefreshVersionsPlugin.kt:20)
	at de.fayard.refreshVersions.RefreshVersionsPlugin$bootstrap$1$1.invoke(RefreshVersionsPlugin.kt:85)
	at de.fayard.refreshVersions.RefreshVersionsPlugin$bootstrap$1$1.invoke(RefreshVersionsPlugin.kt:18)
	at de.fayard.refreshVersions.core.internal.VersionsPlaceholdersReplacementKt.findAnyPreviouslyMatchingVersionEntry(VersionsPlaceholdersReplacement.kt:258)
	at de.fayard.refreshVersions.core.internal.VersionsPlaceholdersReplacementKt.Copy previously matching version entry, if any, and get its version(VersionsPlaceholdersReplacement.kt:234)
	at de.fayard.refreshVersions.core.internal.VersionsPlaceholdersReplacementKt.access$Copy previously matching version entry, if any, and get its version(VersionsPlaceholdersReplacement.kt:1)
	at de.fayard.refreshVersions.core.internal.VersionsPlaceholdersReplacementKt$replaceVersionPlaceholdersFromDependencies$1.execute(VersionsPlaceholdersReplacement.kt:152)

@LouisCAD
Copy link
Member

Hello, first I want to apologize for taking this long to start looking into the issue.

I also want to let you know that in case there's an exception triggered by refreshVersions, it's always helpful to share the stacktrace, as I can glance at it, even if I don't have a laptop/desktop around, ready to dive in (I look at issues a lot from the Android app).

So, I found the culprit, and I'm fixing it now, stay tuned for the hotfix release.

@LouisCAD
Copy link
Member

The version 0.22.0 will include the fix, and if you're in a hurry, the version 0.22.0-SNAPSHOT is being built and should be there in less than 5 minutes.

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

No branches or pull requests

3 participants