Skip to content

Conversation

@mezpahlan
Copy link
Contributor

@mezpahlan mezpahlan commented Nov 11, 2022

Will eventually fix fixes #174 however for the time being this only does by doing the following:

  1. Cleans up the testing diagram in AffectedModuleDetectorImplTest
    • I found it a little difficult understanding the tests and how the diagram played a part in them so have renamed File (directory) references to d and the Gradle project references to p. We could have chosen any identifier but it was a little confusing for me that they were both the same not being familiar with the Gradle test tooling.
  2. Adds failing tests to highlight the issue better.
  3. Strips out ".." markers in the relative project paths so that we can directly compare the Git with Gradle.

Here's a picture of how one might set up Gradle in this weird... quixotic..... way. (Excuse the typo in the screenshot 😄 )

image

The project is declared in the same way but it's location is changed from the default location. Perfectly valid in Gradle..... not very common.... and not (yet) supported in AMD. After this change we will be able to support both.

We use p for Gradle projects and d for File directories on disk. We could have used any identifier but choosing the same letter is a bit of a mind bender for newbies that are not familiar. We also change the diagram to better match how the code sets up the projects.
@mezpahlan
Copy link
Contributor Author

As expected the failing tests fail because in this commit we haven't added the appropriate support.

image

This provides support for quixotic projects.
@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Merging #178 (aefe941) into main (b31f730) will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@ Coverage Diff @@ ## main #178 +/- ## ============================================ + Coverage 53.09% 53.17% +0.08%  Complexity 73 73 ============================================ Files 16 16 Lines 550 551 +1 Branches 99 100 +1 ============================================ + Hits 292 293 +1  Misses 232 232 Partials 26 26 
Impacted Files Coverage Δ
...com/dropbox/affectedmoduledetector/ProjectGraph.kt 91.17% <100.00%> (+0.26%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mezpahlan
Copy link
Contributor Author

Woohoo! The checks pass!
Screenshot from 2022-11-11 16-25-22

@joshafeinberg
Copy link
Member

Alright, this seems good. We use fully qualified paths for all our external stuff so it was a bit harder for me to see what you were mentioning in the ticket but now with this we can support relative paths

@joshafeinberg joshafeinberg merged commit 355ff71 into dropbox:main Dec 1, 2022
@mezpahlan mezpahlan deleted the support_exotic_gradle_projects branch December 2, 2022 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants