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 export-pkg develop=False during conigure(), but True during package() #6583

Closed
puetzk opened this issue Feb 24, 2020 · 2 comments · Fixed by #6585
Closed

[bug] conan export-pkg develop=False during conigure(), but True during package() #6583

puetzk opened this issue Feb 24, 2020 · 2 comments · Fixed by #6585
Assignees
Milestone

Comments

@puetzk
Copy link

puetzk commented Feb 24, 2020

Environment Details (include every applicable attribute)

  • Operating System+version: Windows 10
  • Conan version: 1.22.2
  • Python version: 3.7.4

Steps to reproduce (Include if Applicable)

from conans import ConanFile

class TestConanFile(ConanFile):
    def configure(self):
        self.output.info("configure(), self.develop=%d" % self.develop)
    def package(self):
        self.output.info("package(), self.develop=%d" % self.develop)

Logs (Executed commands with output) (Include/Attach if Applicable)

conan export-pkg . foo/1.0@user/testing
foo/1.0@user/testing: A new conanfile.py version was exported
foo/1.0@user/testing: Folder: C:\Users\re41236\.conan\data\foo\1.0\user\testing\export
foo/1.0@user/testing: Exported revision: fed7d0449c90cbcc0bd7800d87209e09
foo/1.0@user/testing: configure(), self.develop=0
foo/1.0@user/testing: Forced build from source
Packaging to 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
foo/1.0@user/testing: Generating the package
foo/1.0@user/testing: Package folder C:\Users\re41236\.conan\data\foo\1.0\user\testing\package\5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
foo/1.0@user/testing: Calling package()
foo/1.0@user/testing: package(), self.develop=1
foo/1.0@user/testing package(): WARN: No files in this package!
foo/1.0@user/testing: Package '5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9' created
foo/1.0@user/testing: Created package revision b0e08ac3f937a3beab5990549479fec0

Context

I'm experimenting with ways to use the new compatible_packages, trying to migrate some packages that currently omit lots of settings from their package_id because they aren't ABI-relevant to instead fully declare what this binary the package contains, but still not expect users to match (or even specify everything) and just guide them onto one the binary flavors that is actually published. So I want to include compiler info during create() or export-pkg(), but don't want to force a non-C++ caller to set values when loading a dependency graph (which would likely be ignored anyway, in favor of compatible_packages guiding them to the binary upload and want consumers to pick).

Discussion in slack suggests that having self.develop vary from call to call is not intentional and likely a bug. Possibly related to #2513 (which asked for develop to be true in package(), but nothing there suggests to me that it was intended to be true only in package either.

@memsharded memsharded self-assigned this Feb 24, 2020
@memsharded
Copy link
Member

I am having a look at this, might be able to fix it.

However, I am proposing #6584, to remove this attribute for Conan 2.0. It seems that what you could be doing here is some big abuse of this self.develop and probably better means should be considered.

@memsharded
Copy link
Member

Checking if something breaks in: #6585

@memsharded memsharded added this to the 1.23 milestone Mar 6, 2020
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 a pull request may close this issue.

2 participants