Skip to content

Disable output file map diagnostic for non-incremental mode #707

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

keith
Copy link
Member

@keith keith commented Jun 10, 2021

This re-implements this logic https://github.com/apple/swift/blob/3116eed2e465a2688f070b3b87adc106cbbaf09f/lib/Driver/Driver.cpp#L414-L417 to not warn when output file maps don't have a main entry when using WMO

Copy link
Contributor

@davidungar davidungar left a comment

Choose a reason for hiding this comment

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

Thank you for doing this. It looks good, but before merging I'd like to see an XCTest added to check this. It might be easiest to add a test in IncrementalCompilationTests.swift, in which the test runs the driver both with- and without the -incremental flag and checks to see whether the diagnostic is emitted when appropriate.

Would you like to add such a test?

@brentleyjones
Copy link

FYI, this is still an issue in Xcode 13.0 beta 4.

@keith keith force-pushed the ks/disable-output-file-map-diagnostic-for-non-incremental-mode branch from 60e3275 to a75096b Compare August 5, 2021 01:40
@keith
Copy link
Member Author

keith commented Aug 5, 2021

Updated with tests!

@artemcm
Copy link
Contributor

artemcm commented Aug 5, 2021

@swift-ci please test

@artemcm
Copy link
Contributor

artemcm commented Aug 5, 2021

@davidungar could you please take another look? It looks good to go to me.

@keith keith requested a review from davidungar August 6, 2021 02:39
@keith
Copy link
Member Author

keith commented Aug 16, 2021

@davidungar mind taking another look here?

1 similar comment
@keith
Copy link
Member Author

keith commented Aug 23, 2021

@davidungar mind taking another look here?

@brentleyjones
Copy link

@artemcm @davidungar Could we please have another look at this? Thanks!

Copy link
Contributor

@davidungar davidungar left a comment

Choose a reason for hiding this comment

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

Sorry this PR slipped under my radar. Thanks to @CodaFi for pinging me. In future, please feel free to ping me directly.
It would be great if you could add a comment somewhere (if it's not already there) explaining why one would want to exclude the main entry, or under what circumstances. Otherwise, LGTM and thank you for your patience!

@keith keith force-pushed the ks/disable-output-file-map-diagnostic-for-non-incremental-mode branch from f163de5 to 19a09a7 Compare September 9, 2021 15:44
@keith
Copy link
Member Author

keith commented Sep 9, 2021

Done, thanks for following up. To be clear where do you mean when you say "ping you directly"?

@keith keith requested a review from artemcm September 9, 2021 15:53
@artemcm
Copy link
Contributor

artemcm commented Sep 9, 2021

@swift-ci please test

@brentleyjones
Copy link

@artemcm Is this able to get CP'ed into 5.5?

@artemcm
Copy link
Contributor

artemcm commented Sep 9, 2021

@artemcm Is this able to get CP'ed into 5.5?

Yeah, I think this change is pretty safe.
Please create a cherry-pick PR against release/5.5 and use something like swiftlang/swift#39140 as a template for the PR description.

@artemcm artemcm merged commit 6f8d795 into swiftlang:main Sep 9, 2021
@keith keith deleted the ks/disable-output-file-map-diagnostic-for-non-incremental-mode branch September 9, 2021 16:51
@keith
Copy link
Member Author

keith commented Sep 9, 2021

Thanks! Submitted #828 for the CP

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.

4 participants