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

Feature/b2 rooted dep projects #4211

Merged
merged 3 commits into from Jan 14, 2019

Conversation

grisumbras
Copy link
Contributor

@grisumbras grisumbras commented Dec 29, 2018

Changelog: Fix: Allow referring to projects created by b2 generator for dependencies with absolute paths.
Docs: Omit

  • Refer to the issue that supports this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.

@grisumbras
Copy link
Contributor Author

@grafikrobot, do you have any opinion on whether this should be merged, or I should go some other direction with the fix, or maybe it's the docs that should be changed?

@lasote
Copy link
Contributor

lasote commented Jan 3, 2019

@grisumbras is there any created issue for the current PR? Could you create it?
About the PR itself, I would love @grafikrobot to take a look.

@grafikrobot
Copy link
Contributor

Sorry... I was on vacation. First, this is not a bug fix. When I wrote the generator I intentionally did not make the targets global to allow multiple conan config locations. Which is something useful for large projects that have could have multiple libraries and execs using different versions of packages and still allow them to be isolated. Second, you can get the same effect by having the conan info at the root of your project, AFAIK. If that's not the case, then it would indeed be a bug. But this would not be the fix for the bug as this prevents the use case of localized package usage.

@grisumbras
Copy link
Contributor Author

Yes, it fixes #4200. But I indeed want @grafikrobot to share his opinion, because there might be some implications I don't see, or maybe this was the intended behaviour.

@grafikrobot
Copy link
Contributor

Looking at what I wrote in the docs:

For a root level project those could be referenced with an absolute project path, for example /clara.

I would suspect that if that's not working, it's a bug in b2 itself :-( And in the meantime best solution might be to change the docs to mention how to do the use-project if you want the rooted paths.

@@ -385,6 +385,7 @@ def b2_toolset_version(self):
conanbuildinfo_project_template = '''\
# {name}
project-define {name} ;
use-project /{name} : {name} ;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the better fix is something like this (note, not tested, just eyeballing it):

if [ project.is-jamroot-module [ project-define {name} ] ]
{
    use-project /{name} : {name} ;
}

Although putting an equivalent of that in the project-define rule in the prefix would be better.

@lasote lasote removed the type: bug label Jan 4, 2019
@grisumbras grisumbras force-pushed the feature/b2-rooted-dep-projects branch from 3aed999 to 417a150 Compare January 10, 2019 06:38
@grisumbras
Copy link
Contributor Author

Rebased and updated to follow the suggestions. @grafikrobot, can you look at it?

@lasote
Copy link
Contributor

lasote commented Jan 14, 2019

Thanks @grafikrobot and @grisumbras for your help!

@lasote lasote added this to the 1.12 milestone Jan 14, 2019
@lasote lasote merged commit 33f15dd into conan-io:develop Jan 14, 2019
@ghost ghost removed the stage: review label Jan 14, 2019
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 this pull request may close these issues.

None yet

3 participants