Skip to content

Prevent superfluous diagnostic-database execution #34698

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

Merged
merged 1 commit into from
Nov 13, 2020

Conversation

bnbarham
Copy link
Contributor

I noticed a while back that diagnostic-database was running on every compilation. Doesn't really matter since it's quite fast, but I was looking through some CMake stuff today so thought I'd fix it up.

This change just adds dependencies to the two binaries and an output witness file so that it's only re-run when actually required (ie. the binaries change/output isn't there). It should also add the files copied over when they're actually added, that directory is empty at the moment. I considered adding a glob + CONFIGURE_DEPENDS for this but figured we could do that later if wanted.

Add dependencies and output to the diagnostic-database target so that
it's not re-run every time swift-frontend is compiled.
@bnbarham bnbarham requested a review from xedin November 12, 2020 02:04
@bnbarham
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

LGTM, thank you! Let's see how it looks like in a toolchain. I'd as @compnerd to take a look as well.

@xedin xedin requested a review from compnerd November 12, 2020 20:19
@xedin
Copy link
Contributor

xedin commented Nov 12, 2020

@swift-ci please build toolchain

@swift-ci
Copy link
Contributor

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - e9a80de

Install command
tar zxf swift-PR-34698-496-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - e9a80de

Install command
tar -zxf swift-PR-34698-771-osx.tar.gz --directory ~/

@bnbarham
Copy link
Contributor Author

Toolchain looks okay to me.

Linux:
usr/share/swift/diagnostics/
usr/share/swift/diagnostics/en.yaml
usr/share/swift/diagnostics/en.db

OSX:
Library/Developer/Toolchains/swift-PR-34698-771.xctoolchain/usr/share/swift/diagnostics/
Library/Developer/Toolchains/swift-PR-34698-771.xctoolchain/usr/share/swift/diagnostics/en.db
Library/Developer/Toolchains/swift-PR-34698-771.xctoolchain/usr/share/swift/diagnostics/en.yaml

@xedin
Copy link
Contributor

xedin commented Nov 12, 2020

Great!

@xedin xedin merged commit 3ecc3d4 into swiftlang:main Nov 13, 2020
@bnbarham bnbarham deleted the prevent-diagnostic-database branch November 20, 2020 05:48
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