question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature] force a rebuild if already installed but not for dependencies

See original GitHub issue

Hi there, I like to force a rebuild of a recipe but not nessecarily of the dependencies.

Normally I would use the environment variable CONAN_BUILD_POLICY and set it to outdated. But this would apply this setting to the recipe to be processed and to the dependencies. And if the package already exists Conan returns with Already installed.

With a normal conan create call I could set the arguments --build=recipe-name --build=outdated. But CPT does not use multiple build policies (according to the docs).

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Johnnyxycommented, Jul 23, 2019

A complete new setting? As I am aware the CONAN_BUILD_POLICY is a switch to set the --build parameter of Conan calls. A complete new setting would not be in sync with Conan’s settings. Ok, the currently new setting cascade is missing too, but that just has to be added to sync it with Conan’s actual parameter values.

Maybe it would be possible to make CONAN_BUILD_POLICY a list like CONAN_OPTIONS. This would not break existing code of CI or something similar which calls CPT.

set "CONAN_BUILD_POLICY=RECIPE_NAME,outdated"

what would in turn be mapped to

--build # for the recipe itself
--build=outdated # for everything else 

Or a more complex example:

set "CONAN_BUILD_POLICY=RECIPE_NAME,fnpattern,DEPENDENCY2,DEPENDENCY3,outdated"

what would in turn be mapped to

--build
--build=fnpattern
--build=DEPENDENCY2
--build=DEPENDENCY3
--build=outdated
0reactions
boussaffawalidcommented, Jan 3, 2020

@uilianries @lasote checking the source code of CPT here https://github.com/conan-io/conan-package-tools/blob/b50c952d167dbb54e8f82f1ebfab08199214841f/cpt/runner.py#L91 it seems that conan api supports a list of build policies already. so why not make this available in CPT as well ?

I think it is only one line of change: self._build_policy = self._build_policy.split(",") instead of self._build_policy = [self._build_policy]

or did I miss something here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Force Maven to rebuild local dependencies - Stack Overflow
Go to the parent level and run. mvn clean install -pl bar -am. This will build bar and all dependencies of bar ....
Read more >
Add ability to force using system-installed dependency instead ...
Hello, I am writing a Qt-based library and want to create a Conan package. But, I want to give the end-user a choice:...
Read more >
Build and clean projects and solutions in Visual Studio
The Build and Run > Projects and Solutions > Options dialog box opens. Select the Only build startup projects and dependencies on Run...
Read more >
Rebuild - MATLAB & Simulink - MathWorks
If you change a MATLAB file that is executed as part of a callback script that you have not listed in the Model...
Read more >
How to Install and Correct Dependencies Issues in Ubuntu
If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running APT for the first time; ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found