Skip to content

Conversation

modocache
Copy link
Contributor

What's in this pull request?

SR-1129 tracks an issue in which the linking step fails if a base class, defined in an imported module with a public private(set) var, is subclassed by another module. This adds a test that XFAILs on Linux. The test passed on OS X.

This issue is currently forcing swift-corelibs-xctest and swift-corelibs-foundation to mark several privately-used variables as public.

Resolved Related bug number: (SR-1129)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

@modocache
Copy link
Contributor Author

This probably belongs in a different test sub-directory, but I don't know which one... 😅

@modocache modocache changed the title [test] Add a failing test for SR-1129 [test] Add an xfail test demonstrating SR-1129 Apr 4, 2016
@modocache
Copy link
Contributor Author

@gribozavr Friendly ping! It'd be nice to point to a failing test case for https://bugs.swift.org/browse/SR-1129. Advice on where this test belongs would be appreciated, though.

@@ -0,0 +1,3 @@
public class BaseClass {
public internal(set) var variable: Int = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation is 2 spaces.

@gribozavr
Copy link
Contributor

@modocache It is unclear now where should this test go. The test would be placed into a directory that corresponds to the component where the bug is, and it would be FileCheck'ing the IR instead of building a whole binary.

If you do want to build a whole binary (just because we don't know anything more specific about the bug now), I'd suggest moving the test to test/Interpreter/.

This issue is currently forcing swift-corelibs-xctest and swift-corelibs-foundation to mark several privately-used variables as public.

Doesn't the obvious workaround work? Try creating a backing internal stored property, and change the user-visible property to computed.

@modocache
Copy link
Contributor Author

Doesn't the obvious workaround work? Try creating a backing internal stored property, and change the user-visible property to computed.

Assuming I'm understanding you correctly, I don't think that works. For example, this doesn't work if we change the _name variable to private.

I'll move the test to test/Interpreter/, as you suggest--thanks!

@tkremenek
Copy link
Member

@modocache do you still plan on moving the test case?

@tkremenek tkremenek assigned tkremenek and modocache and unassigned tkremenek Apr 10, 2016
SR-1129 tracks an issue in which the linking step fails if a base class,
defined in an imported module with a `public private(set) var`, is subclassed
by another module. This adds a test that XFAILs on Linux. The test
passed on OS X.

This issue is currently forcing swift-corelibs-xctest and
swift-corelibs-foundation to mark several privately-used variables as
`public`.
@modocache
Copy link
Contributor Author

@tkremenek Done! Sorry for the wait :)

@modocache modocache assigned tkremenek and unassigned modocache Apr 11, 2016
@modocache
Copy link
Contributor Author

Assigned back to you for a "@swift-ci please test and merge" 🙇

@gribozavr
Copy link
Contributor

@swift-ci Please test and merge

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.

4 participants