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

Optional user/channel #5381

Merged
merged 39 commits into from
Jul 24, 2019
Merged

Conversation

lasote
Copy link
Contributor

@lasote lasote commented Jun 21, 2019

Changelog: Feature: The "user/channel" fields are now optional. e.g: conan create . is valid if the name and version are declared in the recipe. e.g: conan create . lib/1.0@ to omit user and channel. The same for other commands. The user and channel can also be omitted while specifying requirements in the conanfiles.

Docs: conan-io/docs#1375

Close #5310

@PYVERS: Macos@py27, Windows@py36, Linux@py27
@tags: svn, slow
@revisions: 1

@lasote lasote added this to the 1.18 milestone Jun 21, 2019
conans/client/command.py Outdated Show resolved Hide resolved
conans/model/ref.py Outdated Show resolved Hide resolved
conans/model/ref.py Outdated Show resolved Hide resolved

def copy_with_rev(self, revision):
return ConanFileReference(self.name, self.version, self.user, self.channel, revision)

def copy_clear_rev(self):
return ConanFileReference(self.name, self.version, self.user, self.channel, None)

def __lt__(self, other):
Copy link
Contributor Author

@lasote lasote Jul 19, 2019

Choose a reason for hiding this comment

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

To allow sorting a list of references

conans/client/command.py Outdated Show resolved Hide resolved
conans/client/command.py Outdated Show resolved Hide resolved
@lasote lasote changed the title [DRAFT] Optional user/channel Optional user/channel Jul 19, 2019
@lasote lasote marked this pull request as ready for review July 19, 2019 12:24
@lasote lasote requested a review from memsharded July 19, 2019 12:24
@lasote lasote removed the request for review from memsharded July 19, 2019 16:06
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

I like it, I thought it was going to be more complicated.
Tests are comprehensive and clear too.

Just a couple of minor questions, please check.

conans/test/functional/command/create_test.py Show resolved Hide resolved
conans/test/functional/command/export_test.py Outdated Show resolved Hide resolved
conans/test/integration/hook_test.py Show resolved Hide resolved
conans/test/unittests/model/ref_test.py Outdated Show resolved Hide resolved
conans/model/ref.py Outdated Show resolved Hide resolved
conans/model/ref.py Show resolved Hide resolved
@lasote lasote force-pushed the feature/reference_default branch from 012859b to c6e2f45 Compare July 22, 2019 08:55
@lasote lasote force-pushed the feature/reference_default branch from c6e2f45 to 4f8c721 Compare July 22, 2019 08:57
@lasote lasote merged commit 3953894 into conan-io:develop Jul 24, 2019
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.

Support references without user/channel
2 participants