Skip to content

Add test case for #70019 #70020

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
Dec 2, 2023
Merged

Add test case for #70019 #70020

merged 1 commit into from
Dec 2, 2023

Conversation

WindowsMEMZ
Copy link
Contributor

Added a test case for #70019.

@WindowsMEMZ WindowsMEMZ requested a review from xedin November 25, 2023 16:44
@WindowsMEMZ
Copy link
Contributor Author

@swift-ci Please smoke test

@WindowsMEMZ WindowsMEMZ requested a review from xedin November 25, 2023 17:12
@xedin
Copy link
Contributor

xedin commented Nov 26, 2023

I am away from my computer whole day today and tomorrow but I will take a look on Monday.

@WindowsMEMZ
Copy link
Contributor Author

I away from my computer whole day today and tomorrow but I will take a look on Monday.

OK, Thanks. By the way, can I review other pull requests like you? I didn't find the way. And I wonder can I see a bug's detail by rdar://, or it just for internal?

@xedin
Copy link
Contributor

xedin commented Nov 27, 2023

Okay here is what is passing locally for me:

// RUN: %target-typecheck-verify-swift -swift-version 5
// RUN: %target-typecheck-verify-swift -swift-version 5 -enable-library-evolution -I %t

// REQUIRES: concurrency

// https://github.com/apple/swift/issues/70019

@usableFromInline
struct Foo { // expected-note {{consider making struct 'Foo' conform to the 'Sendable' protocol}}
  var integer: Int
}

struct Bar: Sendable {
  // FIXME: This warning should only be thrown when it complies with library evolution mode
  // FIXME: If @usableFromInline is removed from Foo the Sendable conformance is synthesized as expected.
  var foo: Foo // expected-warning {{stored property 'foo' of 'Sendable'-conforming struct 'Bar' has non-sendable type 'Foo'}}
}

Notice that it has two // RUN: commands because your FIXME states that this warning should only be thrown in library evolution mode we need two runs to make sure that the test starts failing as soon as the issue is fixed.

Also I suggested naming it issueNNN.swift but the format is actually issue-NNNN.swift, sorry about that!

@xedin
Copy link
Contributor

xedin commented Nov 27, 2023

By the way, can I review other pull requests like you?

Sure, feel free to ping me about other PRs.

@WindowsMEMZ
Copy link
Contributor Author

@xedin Thank you, it really helps! Please start a Swift CI test to make it ready to merge.

@AnthonyLatsis
Copy link
Collaborator

By the way, can I review other pull requests like you? I didn't find the way.

Anyone can review pull requests in this repository. Finding an article on how to review changes in pull requests should be straightforward.

And I wonder can I see a bug's detail by rdar://, or it just for internal?

That is an identifier in the internal bug tracker, yes.

@AnthonyLatsis
Copy link
Collaborator

Please squash your commits and see to a proper commit message before we go for merge. You might also want to read our How to Submit Your First Pull Request guidelines.

@WindowsMEMZ
Copy link
Contributor Author

Please squash your commits and see to a proper commit message before we go for merge. You might also want to read our How to Submit Your First Pull Request guidelines.

Thanks, I'll read it.

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

LGTM, thank you! Once -I %t is dropped we can land this.

Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis left a comment

Choose a reason for hiding this comment

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

Thanks! Could you use the PR title as the commit message instead? Git wants them in the imperative mood, plus, GitHub conveniently turns hash references, such as #70019, into links.

@WindowsMEMZ
Copy link
Contributor Author

@AnthonyLatsis @xedin All done! Please run the checks and merge it.

@AnthonyLatsis
Copy link
Collaborator

We were talking just about the -I %t argument, not the command itself.

@WindowsMEMZ
Copy link
Contributor Author

We were talking just about the -I %t argument, not the command itself.

I'm sorry about that, it's OK now.

@AnthonyLatsis
Copy link
Collaborator

@swift-ci please smoke test

@xedin
Copy link
Contributor

xedin commented Dec 1, 2023

@swift-ci please test macOS platform

@xedin
Copy link
Contributor

xedin commented Dec 1, 2023

let's run a full test on macOS just in case

@xedin xedin merged commit 6843e03 into swiftlang:main Dec 2, 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