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

Behaviour of scm plugin for specific commit with local build subdirectory #4139

Closed
3 tasks done
michaelmaguire opened this issue Dec 14, 2018 · 3 comments
Closed
3 tasks done
Assignees

Comments

@michaelmaguire
Copy link

Conan version 1.10.1 on Windows

My team builds for both Linux using debian dpkgs and Conan for Windows.

We are driving our versioning off the dpkg debian/change log file. So first we release using dpkg, with some scripts which update our debian/changelog with a section of the form:

coollib (0.0.10.4) unstable; urgency=low

  * 7b84a69 awesome feature3
  * 23d7f40 awesome feature2
  * 84b4d2b awesome feature1

 -- Michael Maguire <dontusemyemail@youspammers.net>  Tue, 11 Dec 2018 07:02:18 -0500

I'm encouraging my team to use a shared python_requires that allows their conanfile to look something like:

base = python_requires("conan_shared_python_requires/0.0.2@PORT/stable")
        
class ReplicantConan(base.conan_shared_python_requires):        
    name = "coollib"
    url = "git@ourrepo.internal.com:nx/coollib .git"  # conanfile location: in repo
    version, commitAtVersion = base.get_version_from_dpkg_changelog(name)
    scm = {"type": "git",
           "url": url,  # location of source to build
           "revision": commitAtVersion}

So they do the usual Linux release they always did, then use a Conan promotion job which just reads the version and exact commit that went into it from the dpkg changelog.

So far so good, this works fine for conan create . myuser/mystream.

However when I try the 'local build' workflow, e.g.:

E:\DevelopBp\coollib>mkdir build && cd build
E:\DevelopBp\coollib\build>conan install ..

I get:

PROJECT: Configuring sources in E:\DevelopBp\coollib\build
PROJECT: Getting sources from url: 'git@ourrepo.internal.com:nx/coollib .git'
ERROR: The destination folder ' E:\DevelopBp\coollib\build' is not empty, specify a branch to checkout (not a tag or commit) or specify a 'subfolder' attribute in the 'scm'

Is there a way I can achieve this build for a specific version corresponding to a specific commit without breaking the local directory workflow?

To help us debug your issue please explain:

  • I've read the CONTRIBUTING guide.
  • I've specified the Conan version, operating system version and any tool that can be relevant.
  • I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
@jgsogo jgsogo self-assigned this Dec 17, 2018
jgsogo added a commit to jgsogo/conan that referenced this issue Dec 17, 2018
@jgsogo
Copy link
Contributor

jgsogo commented Jan 14, 2019

Sorry for the delay, this issue got misplaced 😓

We are revisiting most of the issues related to the source step (local and cache) and we are paying some attention to them as there could be some issues (#4249, #4262). Issue #4249 could be the solution to your use case, but I need more information to be sure about it, can you try with the code of that PR?

@jgsogo
Copy link
Contributor

jgsogo commented Jan 31, 2019

Hi, we have released v1.12, it comes with changes related to she SCM feature, we found a couple of small flaws and we think we have improved the feature and make it more consistent. I would ask you to try again and let us know if this is still an issue.

Thanks!

@jgsogo
Copy link
Contributor

jgsogo commented Mar 20, 2019

Hi, is it still failing? Maybe we can close this issue and open a new one if the error appears again.

Thanks!

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

No branches or pull requests

3 participants