Skip to content
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
merged 1 commit into from
Jun 2, 2020

Conversation

weissi
Copy link
Member

@weissi weissi commented May 22, 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.

@weissi weissi requested a review from Lukasa May 22, 2020 11:13
@weissi weissi added the 🔨 semver/patch No public API change. label May 22, 2020
@weissi weissi added this to the 2.18.0 milestone May 22, 2020
@weissi weissi force-pushed the jw-silence-filepath-warning branch from bf1cf97 to 80536f3 Compare June 1, 2020 11:59
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.
Copy link
Contributor

@glbrntt glbrntt left a 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)

@weissi
Copy link
Member Author

weissi commented Jun 1, 2020

weird, hit #1535

@weissi
Copy link
Member Author

weissi commented Jun 1, 2020

@swift-nio-bot test this please

@Lukasa
Copy link
Contributor

Lukasa commented Jun 2, 2020

Allocation count problem.

@Lukasa
Copy link
Contributor

Lukasa commented Jun 2, 2020

Per @weissi the 5.3 failure is the result of a regression in 5.3, not this change. Merging over the failure.

@weissi
Copy link
Member Author

weissi commented Jun 2, 2020

@swift-nio-bot test this please

@Lukasa Lukasa merged commit 8b05ba6 into apple:master Jun 2, 2020
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.
@weissi weissi changed the title silence the #file used instead of #filepath warning silence the #file used instead of #filepath warning [HINDSIGHT: DOES NOT WORK] Jun 18, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants