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
GraphViz migration to ValueGraph #2542
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @fortmarek - thanks for migrating this over!
I can't get tuist graph to work on my machine as I always get:
I wonder if it's Big Sur or maybe an installation issue with graphviz
? Worth trying removing and re-installing graphviz.
brew uninstall graphviz
brew install graphviz
If that still fails, you can try changing the output format to be a .dot
file and examining the results (text based).
tuist graph --format dot
While testing I noticed a few discrepancies:
When it comes to filtering targets (by explicitly specifying their name), there's a mismatch between the released version of Tuist and this PR where transitive dependencies are not included:
cd fixtures/ios_app_with_transitive_framework
tuist graph AppTests
Framework2
isn't included.
Unrelated to those changes, I also noticed the tuist graph --skip-external-dependencies
(even the realised version) produces a slightly odd graph (unless I misunderstood what it's meant to do)
cd fixtures/ios_app_with_transitive_framework
tuist graph --skip-external-dependencies
@fortmarek I had the very same issue when fixing the graph command. I feel it is a permission issue. |
I have a question regarding |
thanks @bolismauro! It might be related to permissions but I am not really sure how to fix it/where to look. |
I believe there are some cases like searching for host apps (for tests or extensions) where only local targets need to be searched.
+1 this makes sense to clarify the intent |
all of the troubling scenarios you have listed should be fixed. I tested that locally leveraging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome work @fortmarek
/// Given a project directory and target name, it returns **all**l its direct target dependencies present in the same project. | ||
/// If you want only direct target dependencies present in the same project as the target, use `directLocalTargetDependencies` instead | ||
/// - Parameters: | ||
/// - path: Path to the directory that contains the project. | ||
/// - path: Path to the directory that contains the target's project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π
@@ -9,6 +9,98 @@ import XCTest | |||
@testable import TuistSupportTesting | |||
|
|||
final class ValueGraphTraverserTests: TuistUnitTestCase { | |||
func test_dependsOnXCTest_when_is_framework() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nicely done
Short description π
Migrate GraphViz to ValueGraph
I'd just ask someone to test this locally, please π
I can't get
tuist graph
to work on my machine as I always get:I have no idea what is wrong (I keep getting even after I made fresh install two weeks ago, so maybe my machine is fundamentally and irreparably flawed), so if anyone has an idea how to fix this/debug this, that'd be great.
Checklist β
CHANGELOG.md
has been updated to reflect the changes. In case of a breaking change, it's been flagged as such.