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

[bug] conan editable not working if working directory of editable package matches consumer directory #14091

Closed
edwardvandevorst-philips opened this issue Jun 15, 2023 · 2 comments · Fixed by #14095
Assignees
Milestone

Comments

@edwardvandevorst-philips

Environment details

  • Operating System+version: Windows 10
  • Compiler+version: vs2022 17.6.2
  • Conan version: 2.0.6
  • Python version: 3.7.3

Steps to reproduce

Take the example from conan ( conan/examples2/features/editable/cmake)
Rename the directory say to hello-say

Modify conanfile.py to match conan2 (first lines).
Make say package editable as explained in the example:

cd hello-say
conan editable add conanfile.py --version 0.1
conan install conanfile.py --version 0.1
cmake --preset conan-release
cmake --build --preset conan-release

Now go to the consumer hello and run install

conan install conanfile.txt --version 0.1

And now the error pops up. The editable is pointing to the wrong directory.
See the file build/Release/generators/say-release-x86_64-data.cmake shows the line:

set(say_PACKAGE_FOLDER_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../..-say")

Which should be pointing to the actual package directory.

This only happens if the working directory of the editable package matches the start of the consumer package. Package names are not relevant.

Logs

No response

@memsharded
Copy link
Member

Thanks very much for reporting this @edwardvandevorst-philips, and the clear and detailed steps how to reproduce it, it really helped.

Indeed a bug, in the pattern replacement of the paths in generators. I am submitting #14095 to fix it for next 2.0.7

@edwardvandevorst-philips
Copy link
Author

Thanks for the quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants