Skip to content

[SILGen] Make #function printing more consistent. #19062

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
Sep 6, 2018
Merged

[SILGen] Make #function printing more consistent. #19062

merged 1 commit into from
Sep 6, 2018

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Aug 30, 2018

Print parens and "_:" in cases where a function has no named
parameters.

We already print the parens in cases with no parameters, and the "_:"
for unnamed parameters in cases where there are already named
parameters.

Fixes: rdar://problem/19785368

Print parens and "_:" in cases where a function has no named
parameters.

We already print the parens in cases with no parameters, and the "_:"
for unnamed parameters in cases where there are already named
parameters.

Fixes: rdar://problem/19785368
@rudkx
Copy link
Contributor Author

rudkx commented Aug 30, 2018

@swift-ci Please smoke test

@rudkx rudkx requested a review from jckarter August 30, 2018 01:35
@rudkx
Copy link
Contributor Author

rudkx commented Aug 30, 2018

@swift-ci Please smoke test Linux platform

@rudkx
Copy link
Contributor Author

rudkx commented Aug 30, 2018

@swift-ci Please clean smoke test Linux platform

@jckarter
Copy link
Contributor

Looks good to me. This might deserve a heads up on the swift forums (if you haven't already) in case people are relying on the old behavior.

@rudkx
Copy link
Contributor Author

rudkx commented Aug 30, 2018

@shahmishal Mishal, any idea what's going on with this Linux build failure?

@rudkx
Copy link
Contributor Author

rudkx commented Aug 30, 2018

@jckarter Sure, I'll post a heads-up on the user forum.

@shahmishal
Copy link
Member

@rudkx I have not seen this failure before, @mikeash have you seen this?

@jrose-apple
Copy link
Contributor

That's a change from this PR. The assertion is looking for the old name and needs to be updated.

@rudkx
Copy link
Contributor Author

rudkx commented Aug 30, 2018

@jrose-apple Ah yes, there is a real failure in the tests as well. I hadn't gotten past this:

clang: error: no such file or directory: 'tools/SourceKit/tools/sourcekitd/bin/InProc/CMakeFiles/sourcekitdInProc.dir/sourcekitdInProc.cpp.o'
03:03:24 clang: error: no such file or directory: 'lib/libSourceKitSwiftLang.a'
03:03:24 clang: error: no such file or directory: 'lib/libsourcekitdAPI.a'
03:03:24 clang: error: no such file or directory: 'lib/libSourceKitSwiftLang.a'
03:03:24 clang: error: no such file or directory: 'lib/libSourceKitCore.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftDriver.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftFrontend.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftIDE.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftMigrator.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftFrontend.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftIDE.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftMigrator.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftIndex.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftParseSIL.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftIRGen.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftSILGen.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftSILOptimizer.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftSIL.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftLLVMPasses.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftSema.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftSerialization.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftClangImporter.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftParse.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftAST.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftMarkup.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftOption.a'
03:03:24 clang: error: no such file or directory: 'lib/libSourceKitSupport.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftBasic.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftDemangling.a'
03:03:24 clang: error: no such file or directory: 'lib/libswiftSyntax.a'
03:03:24 clang: error: no such file or directory: 'lib/swift/linux/x86_64/libswiftCore.so'

@mikeash
Copy link
Contributor

mikeash commented Aug 30, 2018

Those errors are apparently some weird but harmless thing that CI latches onto as "the error" when something else goes wrong. That's being tracked in rdar://problem/43165161.

@rudkx
Copy link
Contributor Author

rudkx commented Sep 6, 2018

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit 59efeed into swiftlang:master Sep 6, 2018
@rudkx rudkx deleted the rdar19785368 branch September 10, 2018 18:23
MrMage added a commit to Timing-GmbH/SQLite.swift that referenced this pull request Feb 20, 2019
In Swift 5, the value of `#function` for e.g. `func count(_:)` has changed from `count` to `count(_:)` (see swiftlang/swift#19062), causing `wrap` to produce invalid SQL. We fix this by only using the part of `#function` preceding the first opening parenthesis.
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.

6 participants