Skip to content

[ModuleTrace] Handle cycle detection edge case in module trace emission (ep2). #33640

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

Conversation

varungandhi-apple
Copy link
Contributor

Fixes rdar://67704000.

@varungandhi-apple
Copy link
Contributor Author

@swift-ci please smoke test

///
/// This happens when we have a dependency like:
/// \code
/// Overlay (Swift) -> sandwichedModule -> Underlying (Clang)
/// Overlay (Swift) -> sandwichedModule -> .. -> Underlying (Clang)
Copy link
Contributor

@beccadax beccadax Aug 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@varungandhi-apple With both more distance from the original PR and the description of the cycles it detects becoming more abstract, I find I'm not really clear about what isFakeCycleThroughOverlay() should do. I think this is down to the doc comment requiring too much context to understand. It ought to describe:

  • When these cycles occur
  • What should be done about them (I believe this is "ignore them because they're benign", but that's not clear from the comment)
  • What the relationship should be between the various modules involved in them (e.g. is Overlay always the overlay of Underlying? Can there be other overlays or other underlying modules between them? How is sandwichedModule related to them? How are the other modules in between related to them?)

I think I'll have more success reviewing the actual implementation once I can compare it to a clearer description of what it ought to do.

Copy link
Contributor Author

@varungandhi-apple varungandhi-apple Aug 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to explain things with a concrete example and point out what can happen in the most general case, instead of focusing on the most general thing in the comment. Is it better now?

@varungandhi-apple varungandhi-apple force-pushed the vg-fix-module-trace-cycle branch from 534a14d to daaf609 Compare August 27, 2020 19:25
@varungandhi-apple
Copy link
Contributor Author

@swift-ci please smoke test

@varungandhi-apple varungandhi-apple force-pushed the vg-fix-module-trace-cycle branch from daaf609 to 500d505 Compare September 1, 2020 20:48
@varungandhi-apple
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@beccadax beccadax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some minor suggestions, but nothing showstopping. Thank you for working with me on clarifying what you're trying to do!

@varungandhi-apple varungandhi-apple force-pushed the vg-fix-module-trace-cycle branch from 500d505 to 3e7f339 Compare September 1, 2020 21:23
@varungandhi-apple
Copy link
Contributor Author

@swift-ci please smoke test and merge

@varungandhi-apple
Copy link
Contributor Author

It doesn't seem to have started. Strange.

@swift-ci please smoke test and merge

@varungandhi-apple
Copy link
Contributor Author

@swift-ci please smoke test macOS

@varungandhi-apple varungandhi-apple merged commit 4350a96 into swiftlang:master Sep 2, 2020
@varungandhi-apple varungandhi-apple deleted the vg-fix-module-trace-cycle branch September 2, 2020 18:59
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.

2 participants