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

Do not raise when accessing the metadata of editable packages #5461

Merged
merged 10 commits into from Jul 29, 2019

Conversation

@danimtb
Copy link
Member

commented Jul 8, 2019

Changelog: Bugfix: Do not raise when accessing the metadata of editable packages
Docs: omit

  • Refer to the issue that supports this Pull Request: closes #5424
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

@danimtb danimtb added this to the 1.18 milestone Jul 8, 2019

@lasote
Copy link
Contributor

left a comment

I think this doesn't solve the issue, just the crash, but the remote won't be removed for the editable reference (has to be checked in the test). I understand from the latest comment of @memsharded that the idea is to cheat the cache to consider all packages "cache" packages, but only temporary. But anyway, the remove references have to be cleaned.

@danimtb

This comment has been minimized.

Copy link
Member Author

commented Jul 8, 2019

ok, now I got it. The last conclusion describing the implementation was not clear to me on what to do. Thanks for the clarification.

@danimtb danimtb changed the title Skip touching metadata when packages are in editable mode Do not raise when accessing the metadata of editable packages Jul 8, 2019


def rename(self, remote_name, new_remote_name):
remotes = self.load_remotes()
remotes.rename(remote_name, new_remote_name)
with self._editables_metadata_from_cache():

This comment has been minimized.

Copy link
@SSE4

SSE4 Jul 10, 2019

Contributor

is it possible to exract method? similar code repeats 5 times

This comment has been minimized.

Copy link
@danimtb

danimtb Jul 10, 2019

Author Member

IMO that should be done in a refactor PR, not in this one. I don't refuse to make the changes here but I would like to wait for other reviews before. Thanks!

This comment has been minimized.

Copy link
@SSE4

SSE4 Jul 10, 2019

Contributor

okay

@danimtb danimtb requested a review from lasote Jul 10, 2019

@jgsogo

This comment has been minimized.

Copy link
Member

commented Jul 15, 2019

I would put this new contextmanager closer to the EditablePackages::override function.

...and I would suggest (for a different PR, once this one is done) merging both functions into a context manager that accepts an argument with the dictionary to use (the overriding one for the workspaces, and an empty one for this use case).

conans/client/cache/remote_registry.py Outdated Show resolved Hide resolved

danimtb added some commits Jul 15, 2019

@jgsogo

jgsogo approved these changes Jul 15, 2019

conans/test/functional/command/remote_test.py Outdated Show resolved Hide resolved

danimtb and others added some commits Jul 16, 2019

Update conans/test/functional/command/remote_test.py
Co-Authored-By: Javier G. Sogo <jgsogo@gmail.com>

@lasote lasote merged commit 7989399 into conan-io:develop Jul 29, 2019

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.