Crimix / ChangedProjectsTaskPlugin

A Gradle plugin to run a user defined task on changed projects (modules) and their dependent projects (modules)
https://plugins.gradle.org/plugin/io.github.crimix.changed-projects-task
MIT License
8 stars 2 forks source link

Wrong applications getting built despite right changed application detected #4

Open mklueh opened 2 years ago

mklueh commented 2 years ago

Hello,

I'm leaving the log here. Something odd is happening. As you can see, the changes happened in the package "ml" wich affected the application-a only. Despite that, it runs the build for two other applications.

changedProjectsTask {
    debugLogging = true
    taskToRun = "build"
    affectsAllRegex = [
            ~'build.gradle$' //Changes to the root build.gradle affects all projects
    ]
    ignoredRegex = [
            ~'^.*([.]css|[.]html)$' //Ignore changes to front-end files
    ]
    neverRunProject = [
            ":auth",
            ":auth-base",
            ":base",
...
    ]
}
PS C:\Users\My-PC\Workspace\my-project> ./gradlew --continue runTaskForChangedProjects "-PchangedProjectsTask.run" "-Dquarkus.container-image.build=true" --stacktrace 2> buildLog.txt 
Configuration on demand is an incubating feature.
Printing configuration
Task to run build
Always run project []
Never run project [:auth, :auth-base, :base, :file, :component-library-a, :link, :mail, :message, :component-library-e, :ml, :component-library-d, :component-library-c, :component-library-b]
Affects all regex [build.gradle$]
Ignored regex [^.*([.]css|[.]html)$]
Mode INCLUDE_DEPENDENTS

Git diff command uses git diff --name-only HEAD~ HEAD
All projects affected? false
Changed files:
C:\Users\My-PC\Workspace\my-project\components\ml\build.gradle

Always run projects: []
Never run projects: []
Printing project dependents map
Project: project ':components:auth' is a direct dependent for the following [project ':components:component-library-d', project ':components:component-library-e', project ':components:file', project ':applications:application-c', project ':components:ml', project ':components:component-library-b', project ':applications:application-d', project ':components:component-library-c', project ':components:component-library-a', project ':components:message']
Project: project ':components:component-library-e' is a direct dependent for the following [project ':applications:application-c']
Project: project ':components:file' is a direct dependent for the following [project ':components:component-library-b']
Project: project ':components:mail' is a direct dependent for the following [project ':components:auth', project ':components:component-library-d', project ':applications:application-c', project ':components:component-library-b', project ':applications:application-d', project ':components:component-library-a']
Project: project ':components:component-library-b' is a direct dependent for the following [project ':components:component-library-a']
Project: project ':components:ml' is a direct dependent for the following [project ':applications:application-a']
Project: project ':components:component-library-c' is a direct dependent for the following [project ':components:component-library-b']
Project: project ':components:component-library-a' is a direct dependent for the following [project ':components:component-library-d', project ':applications:application-c']
Project: project ':components:link' is a direct dependent for the following [project ':components:auth', project ':components:mail', project ':applications:application-c', project ':components:component-library-b', project ':applications:application-d', project ':components:component-library-a']
Project: project ':components:message' is a direct dependent for the following [project ':applications:application-c', project ':components:component-library-b', project ':applications:application-d', project ':components:component-library-a']
Project: project ':components:auth-base' is a direct dependent for the following [project ':components:auth', project ':applications:application-c', project ':applications:application-d', project ':components:link']
Project: project ':components:base' is a direct dependent for the following [project ':components:component-library-d', project ':components:component-library-e', project ':components:mail', project ':applications:application-c', project ':components:ml', project ':components:component-library-c', project 
':components:component-library-a', project ':components:link', project ':components:auth-base', project ':components:message', project ':components:auth', project ':components:file', project ':applications:application-a', project ':components:component-library-b', project ':applications:application-d']
Printing project nodes
ProjectNode[project=root project 'my-project', childNodes={components=ProjectNode[project=project ':components', childNodes={mail=ProjectNode[project=project ':components:mail', childNodes={}], auth=ProjectNode[project=project ':components:auth', childNodes={}], soc
ial=ProjectNode[project=project ':components:component-library-b', childNodes={}], link=ProjectNode[project=project ':components:link', childNodes={}], message=ProjectNode[project=project ':components:message', childNodes={}], component-library-a=ProjectNode[project=project ':component
s:component-library-a', childNodes={}], component-library-c=ProjectNode[project=project ':components:component-library-c', childNodes={}], file=ProjectNode[project=project ':components:file', childNodes={}], component-library-d=ProjectNode[project=project ':components:component-library-d', childNodes={}], component-library-e=ProjectN
ode[project=project ':components:component-library-e', childNodes={}], auth-base=ProjectNode[project=project ':components:auth-base', childNodes={}], base=ProjectNode[project=project ':components:base', childNodes={}], ml=ProjectNode[project=project ':components:ml', childNodes
={}]}], applications=ProjectNode[project=project ':applications', childNodes={application-b=ProjectNode[project=project ':applications:application-b', childNodes={}], application-c=ProjectNode[project=project ':applications:application-c', childNodes={}], application-d=ProjectNode[project=project ':applications:application-d', childNodes={}], application-e=ProjectNode[project=project ':applications:application-e', childNodes={}], application-a=ProjectNode[project=project ':applications:application-a', childNodes={}]}]}]

Directly affected projects: [project ':components:ml']
Dependent affected Projects: [project ':applications:application-a']
The Agroal dependency is present but no JDBC datasources have been defined.
@CacheResult is not currently supported on a method returning io.smallrye.mutiny.Multi [class=com.my-project.component-library-b.follow.FollowService, method=getFollowingUUIDs]                                                                                                       
@Transactional will have no effect on method com.my-project.my-package.feature.feature.component-library-e.LinkStatisticsBuilder.findShortLink() because the method is private                                                                                                            
@Transactional will have no effect on method com.my-project.my-package.feature.feature.component-library-e.Routecomponent-library-eBuilder.attachAggregations() because the method is private                                                                                                         
@Transactional will have no effect on method com.my-project.my-package.feature.feature.component-library-e.SiteStatisticsBuilder.applyStatistics() because the method is private
Unrecognized configuration key "quarkus.s3.aws.credentials.type" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
Unrecognized configuration key "quarkus.s3.aws.region" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
Unrecognized configuration key "quarkus.s3.aws.credentials.static-provider.access-key-id" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
Unrecognized configuration key "quarkus.s3.endpoint-override" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
Unrecognized configuration key "quarkus.s3.aws.credentials.static-provider.secret-access-key" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
> Task :applications:application-c:quarkusBuild FAILED
The Agroal dependency is present but no JDBC datasources have been defined.                                                                                                                                                                                               
> Task :applications:application-d:quarkusBuild FAILED
The Agroal dependency is present but no JDBC datasources have been defined.                                                                                                                                                                                               
> Task :components:auth:quarkusBuild FAILED
The Agroal dependency is present but no JDBC datasources have been defined.
Unrecognized configuration key "quarkus.smallrye-graphql.error-extension-field
Crimix commented 2 years ago

To eliminate issues with my plugin, could you try to add this to the root build.gradle and then supply print as the task to run

allprojects {
    task print {
        doLast {
            println ">> " + project.path
        }
    }
}

This would show if it is my plugin propagating wrong or if it is the built-in build task doing this

mklueh commented 2 years ago

@Crimix

I had multiple Gradle settings enabled, not sure if this might be related

org.gradle.caching=true
org.gradle.parallel=true / false //tried both
org.gradle.configureondemand=true

Will check your code later