Skip to content
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

Show version mismatch in -driver-show-incremental #5308

Merged

Conversation

modocache
Copy link
Contributor

SR-2855 suggests -driver-show-incremental not only print information about why certain files are included in incremental compilation, but also print out why incremental compilation may be disabled altogether.

Add a message for one such reason: when the version of the Swift compiler being used to incrementally compile doesn't match the one used to compile previously.

This addresses one part of SR-2855.

// RUN: echo '{version: "bogus", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path %S/Inputs/update-dependencies.py -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json | %FileCheck --check-prefix CHECK-VERSION-MISMATCH %s
// CHECK-VERSION-MISMATCH: Incremental compilation has been disabled
// CHECK-VERSION-MISMATCH: Compiling with: Swift version {{[0-9]}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you match this line a little less aggressively? Xcode Swift has "Apple" stuck in the front, and I could see similar customizations from other vendors in the future. Just matching "Compiling with:" is probably good enough (possibly using FileCheck's -NEXT feature to check that they're on successive lines).

SR-2855 suggests `-driver-show-incremental` not only print information
about why certain files are included in incremental compilation, but
also print out why incremental compilation may be disabled altogether.

Add a message for one such reason: when the version of the Swift
compiler being used to incrementally compile doesn't match the one used
to compile previously.
@modocache modocache force-pushed the sr-2855-driver-show-incremental-version branch from 4064883 to 88ac618 Compare October 17, 2016 22:56
@modocache
Copy link
Contributor Author

@swift-ci please test and merge

@modocache modocache force-pushed the sr-2855-driver-show-incremental-version branch from 8cb4bdd to 88ac618 Compare October 17, 2016 23:40
@swift-ci swift-ci merged commit 617605c into swiftlang:master Oct 17, 2016
@modocache modocache deleted the sr-2855-driver-show-incremental-version branch October 17, 2016 23:45
MaxDesiatov pushed a commit that referenced this pull request Sep 7, 2023
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.

3 participants