Swifterswift: Check all extensions for cross-dependancies

Created on 22 Oct 2017  路  3Comments  路  Source: SwifterSwift/SwifterSwift

The idea behind SwifterSwift is to have the widest collection of extensions grouped in one place, and at the same time give users the ability to copy any extension and use it as an independent unit in their code.

We want to double check one final time that all extensions follow the above pattern and the scope of each unit in inclosed within it.

One suggested approach to do this, is for each file in the framework:

  • copy contents to a Swift playground
  • see if Xcode complain about any error like Type 'some_type' has no member 'some_extension'
  • finally check each unit to make sure its scope is inclosed within it
enhancement good first issue help wanted

All 3 comments

286 can be addressed here as well

@omaralbeik by each unit, do you mean that each extension has to be self-sufficient?

By unit I mean any variable or function inside an extension
example:

extension type_1 {
  var a {
    return ...
  }

  func b() {
    ...
    return ...
  }
}
extension type_2 {
  var c {
    return ...
  }

  func d() {
    ...
    return ...
  }
}

here a, b, c and d are units,
c for example should not depend on d, a any other unit

Was this page helpful?
0 / 5 - 0 ratings

Related issues

omaralbeik picture omaralbeik  路  5Comments

fanglinwei picture fanglinwei  路  5Comments

omaralbeik picture omaralbeik  路  3Comments

SD10 picture SD10  路  3Comments

omaralbeik picture omaralbeik  路  3Comments