Skip to content

Make FindDynamicLibrariesTask respond to the changes in directories configured as searchPaths - #215

Draft
paxbun wants to merge 4 commits into
gobley:mainfrom
paxbun:fix/find-dynamic-library-task-cache
Draft

Make FindDynamicLibrariesTask respond to the changes in directories configured as searchPaths#215
paxbun wants to merge 4 commits into
gobley:mainfrom
paxbun:fix/find-dynamic-library-task-cache

Conversation

@paxbun

@paxbun paxbun commented Sep 14, 2025

Copy link
Copy Markdown
Member

Changes

  • Replaced the annotation used in FindDynamicLibraryTask.searchPaths from @Input to @InputFiles.
  • Fixed minor code warnings in FindDynamicLibraryTask.

Testing

  • Made :tests:gradle:jvm-only build multiple C++ libraries.

  • Tested manually with the procedure as follows:

    1. Before building the project, comment out the "gobley-fixture-gradle-jvm-only-cpp-2", part in build.rs so Gradle fails to find the second library.
    2. Run the test, and observe that CppLibraryTest2 fails.
    3. Re-enable the "gobley-fixture-gradle-jvm-only-cpp-2", part and run the test again.
    4. Without this change, FindDynamicLibraryTask uses the cached build result, resulting in a test failure. With this change, FindDynamicLibraryTask responds to the changes and successfully finds the new library.

Issues Fixed

Fixes: #214

@paxbun paxbun added this to the 0.3.5 milestone Sep 14, 2025
@paxbun
paxbun requested a review from SalvatoreT September 14, 2025 05:20
@paxbun paxbun added bug Something isn't working / This PR fixes it gradle Related to the Gradle plugins cargo Related to Cargo integration labels Sep 14, 2025
@paxbun
paxbun removed the request for review from SalvatoreT September 14, 2025 05:53
@paxbun
paxbun marked this pull request as draft September 14, 2025 06:11
@paxbun

paxbun commented Sep 14, 2025

Copy link
Copy Markdown
Member Author

This is blocked by #216.

@paxbun paxbun modified the milestones: 0.3.5, 0.4.0 Sep 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working / This PR fixes it cargo Related to Cargo integration gradle Related to the Gradle plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FindDynamicLibraryTask doesn't respond to Cargo build output changes when build cache is enabled

1 participant