wpilibsuite / WPILibInstaller-Avalonia

Other
8 stars 20 forks source link

Unable to build robot code after moving to WPILib 2023.1.1 Beta 2 #287

Closed lhvy closed 1 year ago

lhvy commented 1 year ago

Describe the bug Just installed WPILib 2023.1.1 Beta 2 macOS ARM version and attempted to build my team's migrated Java code, but was met with

Dependency Error!
GradleRIO detected this build failed due to missing dependencies!
Try again with `./gradlew build` whilst connected to the internet (not the robot!)
If the error persists, ensure you are not behind a firewall / proxy server (common in schools)

I have since cleaned out my Gradle and Maven caches, created a new example project and attempted to build using the WPILib extension, with no luck. The exact command that is being run is ./gradlew build -Dorg.gradle.java.home="/Users/Lucas/wpilib/2023/jdk". Interestingly changing the 2023 to 2022 causes the build to pass. Perhaps the problem is something to do with the move from Java 11 to 17?

I can also confirm that the issue is not internet related or a firewall/blocking issue of any kind, as I am able to download the same dependencies using the WPILib 2022 JDK, and the builds that fail still successfully publish build scans.

To Reproduce Steps to reproduce the behavior:

  1. Install WPILib 2023.1.1 Beta 2 (I used the macOS ARM build)
  2. Generate a new example Java project (I used the Arcade Drive example)
  3. Build robot code using the WPILib extension

Expected behavior Dependencies download and project builds successfully

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Entire error message:

Dependency Error!
GradleRIO detected this build failed due to missing dependencies!
Try again with `./gradlew build` whilst connected to the internet (not the robot!)
If the error persists, ensure you are not behind a firewall / proxy server (common in schools)

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':extractReleaseNative'.
> Could not resolve all files for configuration ':nativeRelease'.
   > Failed to transform hal-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.hal:hal-cpp:2023.1.1-beta-2) to match attributes {artifactType=gr-directory, org.gradle.status=release}.
      > Could not find hal-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.hal:hal-cpp:2023.1.1-beta-2).
        Searched in the following locations:
            file:/Users/Lucas/wpilib/2023/maven/edu/wpi/first/hal/hal-cpp/2023.1.1-beta-2/hal-cpp-2023.1.1-beta-2-osxarm64.zip
   > Failed to transform wpimath-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.wpimath:wpimath-cpp:2023.1.1-beta-2) to match attributes {artifactType=gr-directory, org.gradle.status=release}.
      > Could not find wpimath-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.wpimath:wpimath-cpp:2023.1.1-beta-2).
        Searched in the following locations:
            file:/Users/Lucas/wpilib/2023/maven/edu/wpi/first/wpimath/wpimath-cpp/2023.1.1-beta-2/wpimath-cpp-2023.1.1-beta-2-osxarm64.zip
   > Failed to transform ntcore-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.ntcore:ntcore-cpp:2023.1.1-beta-2) to match attributes {artifactType=gr-directory, org.gradle.status=release}.
      > Could not find ntcore-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.ntcore:ntcore-cpp:2023.1.1-beta-2).
        Searched in the following locations:
            file:/Users/Lucas/wpilib/2023/maven/edu/wpi/first/ntcore/ntcore-cpp/2023.1.1-beta-2/ntcore-cpp-2023.1.1-beta-2-osxarm64.zip
   > Failed to transform cscore-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.cscore:cscore-cpp:2023.1.1-beta-2) to match attributes {artifactType=gr-directory, org.gradle.status=release}.
      > Could not find cscore-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.cscore:cscore-cpp:2023.1.1-beta-2).
        Searched in the following locations:
            file:/Users/Lucas/wpilib/2023/maven/edu/wpi/first/cscore/cscore-cpp/2023.1.1-beta-2/cscore-cpp-2023.1.1-beta-2-osxarm64.zip
   > Failed to transform opencv-cpp-4.6.0-2-osxarm64.zip (edu.wpi.first.thirdparty.frc2023.opencv:opencv-cpp:4.6.0-2) to match attributes {artifactType=gr-directory, org.gradle.status=release}.
      > Could not find opencv-cpp-4.6.0-2-osxarm64.zip (edu.wpi.first.thirdparty.frc2023.opencv:opencv-cpp:4.6.0-2).
        Searched in the following locations:
            file:/Users/Lucas/wpilib/2023/maven/edu/wpi/first/thirdparty/frc2023/opencv/opencv-cpp/4.6.0-2/opencv-cpp-4.6.0-2-osxarm64.zip
   > Failed to transform wpinet-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.wpinet:wpinet-cpp:2023.1.1-beta-2) to match attributes {artifactType=gr-directory, org.gradle.status=release}.
      > Could not find wpinet-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.wpinet:wpinet-cpp:2023.1.1-beta-2).
        Searched in the following locations:
            file:/Users/Lucas/wpilib/2023/maven/edu/wpi/first/wpinet/wpinet-cpp/2023.1.1-beta-2/wpinet-cpp-2023.1.1-beta-2-osxarm64.zip
   > Failed to transform wpiutil-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.wpiutil:wpiutil-cpp:2023.1.1-beta-2) to match attributes {artifactType=gr-directory, org.gradle.status=release}.
      > Could not find wpiutil-cpp-2023.1.1-beta-2-osxarm64.zip (edu.wpi.first.wpiutil:wpiutil-cpp:2023.1.1-beta-2).
        Searched in the following locations:
            file:/Users/Lucas/wpilib/2023/maven/edu/wpi/first/wpiutil/wpiutil-cpp/2023.1.1-beta-2/wpiutil-cpp-2023.1.1-beta-2-osxarm64.zip

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

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

BUILD FAILED in 1s
ThadHouse commented 1 year ago

Hmm, that might be another failure in the installer. Its probably installing the intel binaries. Switching java home to 2022 forces an intel compiler, so it succeed.

ThadHouse commented 1 year ago

Yes, its installed the intel binaries. Let me figure out why.

ThadHouse commented 1 year ago

@lhvy Not sure if I'm going to be able to get to this tonight, but you can solve this for now by just deleting the maven folder in ~/wpilib/2023. That will force it to grab all artifacts from maven, which will let you test the Java 17 compiler. You'll just have to be connected to the internet the first build you do.