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

Depot fails to compile #16

Open
LTrain opened this issue Oct 27, 2023 · 3 comments
Open

Depot fails to compile #16

LTrain opened this issue Oct 27, 2023 · 3 comments

Comments

@LTrain
Copy link

LTrain commented Oct 27, 2023

Hello - my students downloaded your depot to check it out and it fails to compile. I downloaded the code myself in a clean environment and they are correct. The failure is listed below. We're going to try to run gradlew.bat to fix the issues but you should take a look at it since this code branch is being prescribed as a solution for neos on an mk platform.

Task :spotlessGroovyGradleCheck FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':spotlessGroovyGradleCheck'.
The following files had format violations:
build.gradle
@@ -1,131 +1,131 @@
-plugins {\n

  • id "java"\n
  • id "edu.wpi.first.GradleRIO" version "2022.4.1"\n
  • id "com.diffplug.spotless" version "6.1.0"\n
    -}\n
    -\n
    -sourceCompatibility = JavaVersion.VERSION_11\n
    -targetCompatibility = JavaVersion.VERSION_11\n
    -\n
    -def ROBOT_MAIN_CLASS = "frc.robot.Main"\n
    -\n
    -// Define my targets (RoboRIO) and artifacts (deployable files)\n
    -// This is added by GradleRIO's backing project DeployUtils.\n
    -deploy {\n
  • targets {\n
  • roborio(getTargetTypeClass('RoboRIO')) {\n
  • // Team number is loaded either from the .wpilib/wpilib_preferences.json\n
  • // or from command line. If not found an exception will be thrown.\n
  • // You can use getTeamOrDefault(team) instead of getTeamNumber if you\n
  • // want to store a team number in this file.\n
  • team = project.frc.getTeamOrDefault(3512)\n
  • debug = project.frc.getDebugOrDefault(false)\n
    -\n
  • artifacts {\n
  • // First part is artifact name, 2nd is artifact type\n
  • // getTargetTypeClass is a shortcut to get the class type using a string\n
    -\n
  • frcJava(getArtifactTypeClass('FRCJavaArtifact')) {\n
  • }\n
    -\n
  • // Static files artifact\n
  • frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {\n
  • files = project.fileTree('src/main/deploy')\n
  • directory = '/home/lvuser/deploy'\n
  • }\n
  • }\n
  • }\n
  • }\n
    -}\n
    -\n
    -def deployArtifact = deploy.targets.roborio.artifacts.frcJava\n
    -\n
    -// Set to true to use debug for JNI.\n
    -wpi.java.debugJni = false\n
    -\n
    -// Set this to true to enable desktop support.\n
    -def includeDesktopSupport = false\n
    -\n
    ... (214 more lines that didn't fit)
    Violations also present in:
    settings.gradle
    Run 'gradlew.bat :spotlessApply' to fix these violations.
@secmancer
Copy link
Member

Hello! This is Spotless letting you know that the files that you might have changed don't line up with the formatting style that is implemented. To fix it, you run the command suggested towards the end 'gradlew.bat :spotlessApply' on Windows machines or './gradlew spotlessApply' on Mac/Linux. You need to manually run it every time you change something before you build as the regular build command isn't setup to automatically format the code.

@secmancer
Copy link
Member

Also, remember to update the project's tool chain as it's still on 2022.4.1.

@LTrain
Copy link
Author

LTrain commented Oct 31, 2023 via email

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

2 participants