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

Error when running ./gradlew runLfc (Could not determine the dependencies) #1233

Closed
hokeun opened this issue Jun 15, 2022 · 15 comments
Closed

Comments

@hokeun
Copy link
Member

hokeun commented Jun 15, 2022

I encountered a weird error when running ./gradlew runLfc recently.
(I remember running it fine last week)

Below is the raw output from the ./gradlew runLfc command:

$ ./gradlew runLfc --args test/C/src/After.lf

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':org.lflang:generateXtext'.
> Could not resolve all files for configuration ':org.lflang:compileClasspath'.
   > Could not find any matches for org.osgi.service:org.osgi.service.prefs:[1.1.0,1.2.0) as no versions of org.osgi.service:org.osgi.service.prefs are available.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/osgi/service/org.osgi.service.prefs/maven-metadata.xml
       - file:/Users/hokeunkim/.m2/repository/org/osgi/service/org.osgi.service.prefs/
     Required by:
         project :org.lflang > org.eclipse.platform:org.eclipse.core.runtime:3.24.0 > org.eclipse.platform:org.eclipse.equinox.preferences:3.10.0

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1

Would anyone have any ideas about what's going on here?

My computer is M1 Macbook Pro with OS X Monterey (Version 12.3.1). It ran fine last week.
Java version:

$java --version

openjdk 17.0.3 2022-04-19
OpenJDK Runtime Environment Homebrew (build 17.0.3+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.3+0, mixed mode, sharing)

I would really appreciate your help.

@petervdonovan
Copy link
Collaborator

I can reproduce this on Ubuntu, working at the same commit as yesterday, and @billy-bao reported a similar issue 3 hours ago when building LFC. I have no idea why this happened, but it seems like it must be unrelated to any recent pushes.

@hokeun
Copy link
Member Author

hokeun commented Jun 15, 2022

Thank you for confirming, @petervdonovan !

I have no idea why this happened, but it seems like it must be unrelated to any recent pushes.

Do you think this may be related to a change to the maven repo?
I also tried my local maven but it didn't work.

I agree that it's unlikely that this is related to the recent pushes.

@lhstrh would you have any thoughts?

@petervdonovan
Copy link
Collaborator

In IntelliJ I got this seemingly more informative message:

Could not determine the dependencies of task ':org.lflang:generateXtext'.
> Could not resolve all files for configuration ':org.lflang:compileClasspath'.
   > Could not find any matches for org.osgi.service:org.osgi.service.prefs:[1.1.0,1.2.0) as no versions of org.osgi.service:org.osgi.service.prefs are available.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/osgi/service/org.osgi.service.prefs/maven-metadata.xml
     Required by:
         project :org.lflang > org.eclipse.platform:org.eclipse.core.runtime:3.24.0 > org.eclipse.platform:org.eclipse.equinox.preferences:3.10.0

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

And indeed, I get a 404 error from this URL:

https://repo.maven.apache.org/maven2/org/osgi/service/org.osgi.service.prefs/maven-metadata.xml

Whereas this URL is valid:

https://repo.maven.apache.org/maven2/org/osgi/org.osgi.service.prefs/maven-metadata.xml

@lhstrh
Copy link
Member

lhstrh commented Jun 15, 2022

@petervdonovan where did you find the valid URL?

@petervdonovan
Copy link
Collaborator

I was just poking around here. But I have no insight on what this similar URL is or whether it is even relevant.

@lhstrh
Copy link
Member

lhstrh commented Jun 15, 2022

Maybe we could specify that working URL manually and see whether that fixes the problem?

@petervdonovan
Copy link
Collaborator

A quick workaround is to decrement the runtimeVersion in gradle.properties:

runtimeVersion=3.23.0

Maybe this isn't what we want, but at least this issue shouldn't be a blocker for anyone.

@lhstrh
Copy link
Member

lhstrh commented Jun 15, 2022

How about an upgrade to 3.25.0?

@petervdonovan
Copy link
Collaborator

How about an upgrade to 3.25.0?

That did not seem to work on my machine.

@lhstrh
Copy link
Member

lhstrh commented Jun 15, 2022

You're right, this seems to be the only reasonable fix for now. On a related note, I just noticed that Xtext 2.27.0 has been released.

@lhstrh
Copy link
Member

lhstrh commented Jun 15, 2022

I've tried to fix this in #1234, but alas, Maven still won't work. @a-sr, would you be able to take a look?

@a-sr
Copy link
Collaborator

a-sr commented Jun 15, 2022

You are trying to downgrade the Eclipse core runtime version, that means you are actually trying to switch back to the 2021-12 release. This is the reason why the maven build fails because it is configured to use the 2022-03 release and its dependencies, hence, it can not resolve runtime version 3.23 from the previous release.

If that is a gradle specific problem, it might be a workaround to de-sync the build configurations and use the 2021-12 release (runtime 3.23) in gradle and the 2022-03 release (runtime 3.24) in maven. If you want to do that, you have to revert the changes to the pom.xml in #1234 because that is the one causing the maven error.

Another option would be roll back everything to the 2021-12 release, hence, all version configurations, updatesites, and the oomph setup.

BTW, today is the release date for Eclipse 2022-06, it is not yet available but maybe an upgrade will fix the problems as well.

@a-sr
Copy link
Collaborator

a-sr commented Jun 15, 2022

I just realized that since this error only occurred very recently it might be related to the Eclipse release that is supposedly in progress.

@lhstrh
Copy link
Member

lhstrh commented Jun 15, 2022

Here is more context: eclipse-equinox/equinox.bundles#54

@lhstrh
Copy link
Member

lhstrh commented Jun 17, 2022

Looks like this has been fixed.

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

4 participants