Skip to content
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

Swift 2.0 #261

Merged
merged 25 commits into from
Sep 8, 2015
Merged

Swift 2.0 #261

merged 25 commits into from
Sep 8, 2015

Conversation

jpsim
Copy link
Collaborator

@jpsim jpsim commented Jul 27, 2015

AFAICT this is more or less working, but I've been making changes to SourceKitten ad-hoc (and here a bit too), so I'll probably rework that quite a bit before ever shipping a release to either.

I make no promises as to the state of things, but feel free to experiment if you're feeling adventurous!

@@ -168,12 +166,6 @@ def self.make_doc_info(doc, declaration)
@documented_count += 1
end

def self.string_until_first_rest_definition(string)
Copy link
Collaborator

Choose a reason for hiding this comment

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

need to keep this in case we're running against swift 1.2

Copy link
Collaborator

Choose a reason for hiding this comment

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

still applies

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

re-added

@jpsim
Copy link
Collaborator Author

jpsim commented Aug 24, 2015

FYI: I'll be rebasing this on master, cutting a final release of jazzy targeting Swift 1.2, and then intend to merge this PR. If you'd like to review these changes, now's the time.

@jpsim jpsim force-pushed the swift-2.0 branch 4 times, most recently from c346207 to a3c16ce Compare August 28, 2015 19:41
@segiddins
Copy link
Collaborator

Please rebase, I'll try and review this weekend

@jpsim jpsim changed the title [WIP] Swift 2.0 Swift 2.0 Sep 4, 2015
@jpsim
Copy link
Collaborator Author

jpsim commented Sep 4, 2015

This has now been rebased against master, and is no longer work-in-progress.

I consider this ready to be merged, but will leave this open over the weekend in case anyone wants to review @segiddins @pcantrell

@pcantrell
Copy link
Collaborator

FWIW, I’ve been working exclusively off this branch for the Siesta docs, and things have been working just fine.

@orta
Copy link
Collaborator

orta commented Sep 4, 2015

Awesome.

@jpsim jpsim force-pushed the swift-2.0 branch 2 times, most recently from a0ecf29 to 8a9ead8 Compare September 4, 2015 21:18
type = SourceDeclaration::Type.new(doc['key.kind'])
return true if type.enum_element?
if type.extension?
return (doc['key.substructure'] || []).any? do |subdoc|
Copy link
Collaborator

Choose a reason for hiding this comment

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

Array(doc['key.substructure'])

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this version is more explicit, and actually shorter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Except it's less safe, since Array() coerces anything to an array, including arrays, nil, and a single object.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I prefer || [] for exactly the same reason @segiddins prefers the other: it’s clear what it does, whereas Array() uses to_ary and sometimes works in surprising ways. Probably fine in this situation though.

@segiddins
Copy link
Collaborator

CHANGELOG?

@jpsim
Copy link
Collaborator Author

jpsim commented Sep 7, 2015

Riiiight, so since Travis runs the xcode7 image, it doesn't have Xcode 6.4 installed, so we can't test Swift 1.2. I played around with matrix builds, but couldn't get it to work: https://twitter.com/simjp/status/639898078892453888

@jpsim
Copy link
Collaborator Author

jpsim commented Sep 7, 2015

Ok, I finally got a Xcode 6.4/7 matrix working on Travis.

@jpsim
Copy link
Collaborator Author

jpsim commented Sep 8, 2015

I think we're all good here! Thanks @pcantrell and @segiddins for making this release happen

jpsim added a commit that referenced this pull request Sep 8, 2015
@jpsim jpsim merged commit 7fcb023 into master Sep 8, 2015
@dmcgloin
Copy link

dmcgloin commented Oct 9, 2015

Does the Requirements section of the main ReadMe need to change?

"Requirements
A 6.x version of Xcode capable of building the Swift project you wish to document, installed anywhere under /Applications . Support for Xcode 7 betas is in progress (see #261)."

@nicolas-miari
Copy link

Exactly. Xcode 7 no longer is in beta (except the upcoming 7.1, of course...) and Swift 2 is the current version of the language now.

@jpsim
Copy link
Collaborator Author

jpsim commented Oct 20, 2015

I've updated the README in b71256f to reflect this, thanks!

@jpsim jpsim deleted the swift-2.0 branch November 17, 2015 00:19
@istx25 istx25 modified the milestone: The Past Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants