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

Add support for YouCompleteMe integration #65

Merged
merged 6 commits into from
Jan 2, 2016

Conversation

skizzay
Copy link
Contributor

@skizzay skizzay commented Jan 2, 2016

Add support for YouCompleteMe code-completion engine for Vim. This will generate the python file for it to work with the build/install directories generated by conan.

As part of this change, I also added support for calculating the current cpp info when writing the generator. This allows the current generator to take advantage of the packages intended compilation flags.

I also attached a property to each ConanFile that gets loaded called conanfile_directory. This contains the directory from which the ConanFile was loaded. It's completely unrelated to the other change so we can probably create a separate pull request for it, if it's desired.

@skizzay
Copy link
Contributor Author

skizzay commented Jan 2, 2016

Looks like it's back to the ol' drawing board and see what I'm breaking...

@@ -76,6 +76,7 @@ def load_conan(self, conan_file_path, consumer=False):
result = self._create_check_conan(loaded, consumer)
if consumer:
result.options.initialize_upstream(self._options)
type(result).conanfile_directory = property(lambda self, _path=conan_file_path: os.path.dirname(_path))
Copy link
Member

Choose a reason for hiding this comment

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

Yes, I'd say it'd be better to handle this in a separate pull request. In particular, I think that the conanfile_directory can be made an explicit property in the base ConanFile class. If the path is dynamically assigned as it seems the case, I'd assign it here (and comment in the ConanFile class property that the value is dynamic). I like conanfile user-related things to be at least defined in the base ConanFile class for reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll cherry pick out this commit and create a separate pull request. We can discuss the best way to handle it in there.

@memsharded
Copy link
Member

Overall, this seems a very interesting contribution, thanks very much!! I am checking a minor detail, but it can be merged. If you can have a look to the conanfile_directory thing, and do a separate PR, great, but not a big issue, I'll merge it anyway as-is.

@memsharded
Copy link
Member

Awesome! Thanks a lot, it is perfect now. Lets merge it :)

memsharded added a commit that referenced this pull request Jan 2, 2016
Add support for YouCompleteMe integration
@memsharded memsharded merged commit be3b754 into conan-io:develop Jan 2, 2016
@skizzay skizzay deleted the ycm-generator branch January 3, 2016 11:52
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.

2 participants