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

Multiplatform build fails when not using Realm in all source sets #544

Closed
FERNman opened this issue Nov 9, 2021 · 3 comments · Fixed by #593
Closed

Multiplatform build fails when not using Realm in all source sets #544

FERNman opened this issue Nov 9, 2021 · 3 comments · Fixed by #593
Assignees

Comments

@FERNman
Copy link

FERNman commented Nov 9, 2021

When using the Realm Gradle plugin (0.7.0) in a multiplatform project, the build fails for source sets not using the Realm library (in our case, the JVM) with the following error message:

java.lang.IllegalStateException: Cannot find io.realm.RealmConfiguration.Builder on platform JVM (JVM_1_8).

This was not the case with older versions of the plugin (we upgraded from 0.4.1). As far as I can tell, it was introduced by #395.
The issue comes from the schema lowering extension that tries to find the realm configuration builder (and throws if it doesn't exist) before the builder was actually used for the first time.

@rorbech
Copy link
Contributor

rorbech commented Nov 10, 2021

Thanks for the report. We tried to cache class lookups early to avoid duplicate look ups, but didn't think of the use case that the plugin is running on source sets that doesn't depend on our library.

nhachicha added a commit that referenced this issue Nov 24, 2021
nhachicha added a commit that referenced this issue Nov 29, 2021
* Fixes #544 (Add check for partial dependency application, that can detect lookup of compiler plugin symbol outside used sources)
@nhachicha
Copy link
Collaborator

@FERNman This has been fixed, you can try the SNAPSHOT release, or wait for the upcoming 0.8.0 release.

@FERNman
Copy link
Author

FERNman commented Nov 29, 2021

@nhachicha Thanks for the quick fix! 🙂

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants