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

Align default output folder with Gradle best practices #755

Merged

Conversation

holgerstolzenberg
Copy link
Contributor

Fixes #754

@holgerstolzenberg
Copy link
Contributor Author

What do I have to do to get that one reviewed?

@ejona86 ejona86 force-pushed the feature/default-output-folder branch from 7112d80 to 1b37bbe Compare November 12, 2024 15:53
@ejona86
Copy link
Collaborator

ejona86 commented Nov 12, 2024

Some GitHub Actions are failing. The error "exec: /nothing: not found" is suspicious and they haven't run in 6 months, so I suspect they are broken on master, best guess due to an Ubuntu upgrade. That'll need some investigation.

@ejona86
Copy link
Collaborator

ejona86 commented Nov 12, 2024

Looks like the CI is still failing, and the CI is working fine on master, so the problem is this PR.

It looks like the /nothing is a red herring. It was just part of stderr but was expected. Looking higher in the log shows the error:

com.google.protobuf.gradle.ProtobufJavaPluginTest > test proto extraction is up-to-date for testProject when changing java sources [gradle 7.6] STANDARD_ERROR

    FAILURE: 
    Build failed with an exception.


    * Where:

    Script '/home/runner/work/protobuf-gradle-plugin/protobuf-gradle-plugin/build/tests/testProject/build_base.gradle' line: 132


    * What went wrong:

    Execution failed for task ':test'.

    > 
    assert expectedDirs == actualDirs

             |            |  |

             |            |  []

             |            false

             [/home/runner/work/protobuf-gradle-plugin/protobuf-gradle-plugin/build/tests/testProject/build/generated/source/proto/main/java]

I think you need to update the test projects, like:

val baseDir = File("${project.buildDir}/generated/source/proto/$sourceSet")

@holgerstolzenberg
Copy link
Contributor Author

You are totally right - the tests completely slipped my radar 🙈.

Actually searching the codebase reveals much more spots if output path assertions. I fixed them all. The problem is I cannot fully run the tests locally, I have no Android setup and other stuff is also missing. I tested the plugin manually after building it locally and it worked.

I had hopes I could just run it through the CI here - but it looks like GitHub is not kicking the build again....

@ejona86 ejona86 merged commit 2810499 into google:master Nov 13, 2024
11 checks passed
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

Successfully merging this pull request may close these issues.

Use plural form default output directory 'generated/sources'
2 participants