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

@danimtb danimtb 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
Copy link
Contributor

@lasote lasote 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.

Loading

@danimtb
Copy link
Member Author

@danimtb danimtb 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.

Loading

@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
conans/test/functional/command/remote_test.py Show resolved Hide resolved
Loading
conans/test/functional/command/remote_test.py Show resolved Hide resolved
Loading

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():
Copy link
Contributor

@SSE4 SSE4 Jul 10, 2019

Choose a reason for hiding this comment

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

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

Loading

Copy link
Member Author

@danimtb danimtb Jul 10, 2019

Choose a reason for hiding this comment

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

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!

Loading

Copy link
Contributor

@SSE4 SSE4 Jul 10, 2019

Choose a reason for hiding this comment

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

okay

Loading

@danimtb danimtb requested a review from lasote Jul 10, 2019
@jgsogo
Copy link
Member

@jgsogo jgsogo 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).

Loading

conans/client/cache/remote_registry.py Outdated Show resolved Hide resolved
Loading
jgsogo
jgsogo approved these changes Jul 15, 2019
conans/test/functional/command/remote_test.py Outdated Show resolved Hide resolved
Loading
@lasote lasote merged commit 7989399 into conan-io:develop Jul 29, 2019
2 checks passed
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants