Closed mir333 closed 4 years ago
Can you provide some more details?
I'm aware of a current issue where an updated version of RESTBuilder breaks the build, but this is the first I'm hearing about a dependency issue...
When I run the ./gradlew clean buildREST build on a fresh copy the build fails.
It fails on
...
symbol: method description()
location: @interface GraphQLField
/tmp/vitamins/modules/headless-vitamins/headless-vitamins-api/src/main/java/com/dnebinger/headless/vitamins/dto/v1_0/Vitamin.java:162: error: cannot find symbol
description = "The chemical names of the vitamin or mineral if it has some."
... ^
This can be resolved by removing the description from the yaml. After that, the generation goes well but the compilation fails. The vulcan.api that is included in the BOM does not have classes that are generated by the rest builder.
I fix this by including the latest version of the vulcan.API and also the vulcan.impl into my bundle.
It deploys but on deploy time it will complain about GraphQL annotation dependencies. At this point, I'm getting quite annoyed by it :)
Is there somewhere a record that shows what dependencies are there for a particular version of rest builder?
Yep, that's the issue David was referring to. I'll investigate the exact dependency this project is using and send a PR
It's using the 1.0.23 version, I've updated the build.gradle to reflect it and everything should generate accordingly as the uploaded code (except a test that was manually commented).
This should deploy and execute without issues in 7.2, please reopen the issue if necessary :)
The problem at deployment time still remains as I mentioned in the previous comment.
rg.osgi.framework.BundleException: Could not resolve module: im.ligas.restbuilder.api [1127]_ Unresolved requirement: Import-Package: com.liferay.portal.vulcan.graphql.annotation; version="[1.2.0,2.0.0)"_ [Sanitized]
I think we need the API of version 4.0.0 a least but what version of vulcan impl goes with it and what rest builder version?
I'll fix vulcan versions. Which version of Liferay are you using? 7.2 GA2?
This package (generated with 1.0.23) shouldn't need com.liferay.portal.vulcan.graphql.annotation
(custom annotations), so it should need an older vulcan version.
I'm using this DXPC image liferaycloud/liferay-dxp:7.2.10-sp1-3.0.14
And I used liferay.workspace.target.platform.version=7.2.10.fp2
Ok, sp1 is pretty recent, that's why you need the new annotations (AFAIK this project was build with 7.2 GA1).
No need to update vulcan, just use the versions provided in 7.2.10 sp1 (3.8.4 of vulcan api I think*). I've created a branch with the right rest builder, regenerated (I have to do a version matrix) and tried in a fresh 7.2 sp1 and everything should work ok: https://github.com/dnebing/vitamins/commits/7.2.sp1
Please reopen if neccesary :)
The project is failing on Gradle build. Seems there is some dependencies mix-up.