Skip to content

[DO NOT MERGE] Extra testing for FileSpecificDiagnosticConsumer #14927

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

Closed
wants to merge 4 commits into from

Conversation

jrose-apple
Copy link
Contributor

A version of #14900 without a short-circuit optimization for single-file output, to test the effects of the new consumer on actual projects.

If a top-level diagnostic is in a particular source range, the
RangeSpecificDiagnosticConsumer will funnel it and any attached notes
to a particular "sub-consumer" designated for that range (intended to
be used with whole files). If it's not in a range designated for any
sub-consumer, the diagnostic is passed to all registered
sub-consumers.

This is intended to be used for batch mode, so that diagnostics that
are definitely associated with a particular file can be emitted in
that file's .dia output, while diagnostics that may be associated with
other files (such as those that come from Clang) will still get
presented to the user.
It turns out that we need to have the diagnostic consumers set up
before we've actually opened the input files, which makes sense
because we might want to emit diagnostics about not being able to open
an input file. Switch to using file names instead, and mapping those
over to source ranges only once we actually need to handle a
diagnostic with a valid source location.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test compiler performance

@swift-ci
Copy link
Contributor

swift-ci commented Mar 2, 2018

Build comment file:

Summary for master smoketest

Unexpected test results, excluded stats for ReactiveCocoa

No regressions above thresholds

Debug

debug brief

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 26,841,088 26,841,072 -16 -0.0%
time.swift-driver.wall 42.7s 42.6s -101.0ms -0.24%

debug detailed

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (23)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 24,621 24,621 0 0.0%
AST.NumLoadedModules 3,821 3,821 0 0.0%
AST.NumTotalClangImportedEntities 65,522 65,522 0 0.0%
AST.NumUsedConformances 2,810 2,810 0 0.0%
IRModule.NumIRBasicBlocks 76,304 76,304 0 0.0%
IRModule.NumIRFunctions 40,414 40,414 0 0.0%
IRModule.NumIRGlobals 47,397 47,397 0 0.0%
IRModule.NumIRInsts 977,817 977,817 0 0.0%
IRModule.NumIRValueSymbols 77,635 77,635 0 0.0%
LLVM.NumLLVMBytesOutput 26,841,088 26,841,072 -16 -0.0%
SILModule.NumSILGenFunctions 34,409 34,409 0 0.0%
SILModule.NumSILOptFunctions 35,544 35,544 0 0.0%
Sema.NumConformancesDeserialized 127,614 127,614 0 0.0%
Sema.NumConstraintScopes 423,365 423,365 0 0.0%
Sema.NumDeclsDeserialized 780,199 780,199 0 0.0%
Sema.NumDeclsValidated 38,180 38,180 0 0.0%
Sema.NumFunctionsTypechecked 17,195 17,195 0 0.0%
Sema.NumGenericSignatureBuilders 26,721 26,721 0 0.0%
Sema.NumLazyGenericEnvironments 146,607 146,607 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 15,776 15,776 0 0.0%
Sema.NumLazyIterableDeclContexts 106,541 106,541 0 0.0%
Sema.NumTypesDeserialized 813,505 813,505 0 0.0%
Sema.NumTypesValidated 128,468 128,468 0 0.0%

Release

release brief

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 30,982,784 30,982,784 0 0.0%
time.swift-driver.wall 88.6s 88.9s 262.3ms 0.3%

release detailed

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (23)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 5,099 5,099 0 0.0%
AST.NumLoadedModules 233 233 0 0.0%
AST.NumTotalClangImportedEntities 16,495 16,495 0 0.0%
AST.NumUsedConformances 2,814 2,814 0 0.0%
IRModule.NumIRBasicBlocks 75,642 75,642 0 0.0%
IRModule.NumIRFunctions 33,329 33,329 0 0.0%
IRModule.NumIRGlobals 38,443 38,443 0 0.0%
IRModule.NumIRInsts 777,451 777,451 0 0.0%
IRModule.NumIRValueSymbols 68,214 68,214 0 0.0%
LLVM.NumLLVMBytesOutput 30,982,784 30,982,784 0 0.0%
SILModule.NumSILGenFunctions 17,516 17,516 0 0.0%
SILModule.NumSILOptFunctions 24,872 24,872 0 0.0%
Sema.NumConformancesDeserialized 77,137 77,137 0 0.0%
Sema.NumConstraintScopes 413,329 413,329 0 0.0%
Sema.NumDeclsDeserialized 151,850 151,850 0 0.0%
Sema.NumDeclsValidated 23,659 23,659 0 0.0%
Sema.NumFunctionsTypechecked 7,503 7,503 0 0.0%
Sema.NumGenericSignatureBuilders 5,269 5,269 0 0.0%
Sema.NumLazyGenericEnvironments 23,661 23,661 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 2,904 2,904 0 0.0%
Sema.NumLazyIterableDeclContexts 14,054 14,054 0 0.0%
Sema.NumTypesDeserialized 173,595 173,595 0 0.0%
Sema.NumTypesValidated 52,035 52,035 0 0.0%

@jrose-apple
Copy link
Contributor Author

Not that this is super interesting because there probably aren't many diagnostics in the compat suite, but still, it's something.

@jrose-apple
Copy link
Contributor Author

Cool, everything works.

@jrose-apple jrose-apple closed this Mar 2, 2018
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