-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
silence the #file used instead of #filepath warning [HINDSIGHT: DOES NOT WORK] #1526
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bf1cf97
to
80536f3
Compare
Motivation: Very recent versions of the Swift compiler complain if you pass `#file` to a parameter that is defaulted to `#filePath`. You can silence the warning by using `(#file)`. We cannot migrate to `#filepath` because we support Swift 5.0 and 5.1 which don't have `#filepath` yet. Modifications: - replace all occurances of `#file` by a special (test `internal`) function `fullFilePath()` which gives you the full path and is defined differently depending on the compiler version. Result: No warnings even on the latest compiler versions.
80536f3
to
3e32822
Compare
glbrntt
approved these changes
Jun 1, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM minus the CI (5.0 is #1535)
weird, hit #1535 |
@swift-nio-bot test this please |
Allocation count problem. |
Per @weissi the 5.3 failure is the result of a regression in 5.3, not this change. Merging over the failure. |
@swift-nio-bot test this please |
pull bot
pushed a commit
to scope-demo/swift-nio
that referenced
this pull request
Jun 2, 2020
Motivation: Very recent versions of the Swift compiler complain if you pass `#file` to a parameter that is defaulted to `#filePath`. You can silence the warning by using `(#file)`. We cannot migrate to `#filepath` because we support Swift 5.0 and 5.1 which don't have `#filepath` yet. Modifications: - replace all occurances of `#file` by a special (test `internal`) function `fullFilePath()` which gives you the full path and is defined differently depending on the compiler version. Result: No warnings even on the latest compiler versions.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
Very recent versions of the Swift compiler complain if you pass
#file
to a parameter that is defaulted to
#filePath
. You can silence thewarning by using
(#file)
. We cannot migrate to#filepath
because wesupport Swift 5.0 and 5.1 which don't have
#filepath
yet.Modifications:
#file
by a special (testinternal
)function
fullFilePath()
which gives you the full path and is defineddifferently depending on the compiler version.
Result:
No warnings even on the latest compiler versions.