-
Notifications
You must be signed in to change notification settings - Fork 282
Discussion: Pod version completion #313
Discussion: Pod version completion #313
Conversation
def self.pod_versions(podName) | ||
sources_manager.aggregate.search_by_name(podName).first.versions.map do |version| | ||
version.to_s | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sources_manager.aggregate.search_by_name(podName).first.versions.map(&:to_s)
is a tad more elegant 👍
I've reworked the fetching of the pod versions based on the current cursor position as suggested, this looks a bit nicer since the need to block on fetching the pod versions is also eliminated.
I'm not sure much can be done here as this is built on top of However, I still think the tweak to |
The Travis builds seem to be erroring with a missing API token for danger. Is there something I should do about that? |
That's not a worry - we don't expose Danger's auth to PRs ATM, which we should do I think |
Sorry for the delay on this one, wanted to make sure a stable 1.0 is out, then can starting thinking about the next release |
@@ -1267,6 +1267,15 @@ - (NSRange)rangeForUserCompletion | |||
{ | |||
return NSMakeRange(NSNotFound, 0); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is the bit that worries me, the next time we do a pod install
this gets overwritten.
In #333 there are some (now merged into master) functions added that may be able to replicate some of this work without having to make changes at SMLTextView level, any chance you can take a quick look? I'd like to get this merged so we can start looking at it more holistically for #311 and building an AST. It's easier to work with these things in place first IMO 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have a look at those changes and how I can build on top.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping to make some progress here, however, this has run into some trouble.
There seem to be two options:
- swizzle the implementation of the methods that I've adjusted
- subclass
SMLTextView
with the changes
I thought subclassing would be preferable to swizzling. In the end I've discovered that I can't easily drop in a subclass for SMLTextView
and that swizzling is already used (SMLTextView+CocoaPods.m
).
I'll have another look at swizzling later.
…nto feature/pod_version_completion # Conflicts: # app/CocoaPods/CPPodfileEditorViewController.swift
…nto feature/pod_version_completion
…CocoaPods-app into feature/pod_version_completion
This should be ready for another look. |
You can find it at CHANGELOG.md.
Generated by 🚫 danger |
OK, this looks great - I think Danger will pop up and warn you about a CHANGELOG entry |
oh, yeah, there it is, so - just add that, then we're good to go - thanks! |
Ace! |
Relating to #311, this is a rough implementation of looking up pod versions using the reflection service.
While I have some concerns relating to the editor changes —
my primary concern is the changes needed in Fragaria to adjust when completions are allowed and if all options are returned with an empty prefix.