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

New lockfiles iteration. Including version-only lockfiles. #7243

Merged
merged 124 commits into from Jul 28, 2020

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Jun 23, 2020

Changelog: Feature: Complete revamp of the lockfiles feature. Including version-only lockfiles, partial lockfiles, new command line syntax, improved management of build-order and many pending fixes.
Docs: conan-io/docs#1790

#tags: slow
#revisions: 1

Close #7245
Close #7279
Close #7290
Close #7333
closes #7137
closes #7141
closes #6065
Close #7063

@memsharded memsharded requested a review from danimtb Jul 27, 2020
@memsharded memsharded self-assigned this Jul 27, 2020
conans/client/command.py Outdated Show resolved Hide resolved
conans/client/command.py Outdated Show resolved Hide resolved
conans/client/command.py Outdated Show resolved Hide resolved
conans/client/command.py Outdated Show resolved Hide resolved
memsharded and others added 3 commits Jul 28, 2020
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
client.run("create . pkg2/1.0@")
client.run("lock create --reference=pkg2/1.0@ --build --lockfile-out=conan.lock")
client.run("install cmake/[>=1.0]@ --lockfile=conan.lock", assert_error=True)
self.assertIn("ERROR: Multiple matches in lockfile: 'cmake/1.0', 'cmake/1.1'",
Copy link
Member

@danimtb danimtb Jul 28, 2020

Choose a reason for hiding this comment

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

Should this be an error or just a warning and pick the most updated semver version?

Copy link
Member Author

@memsharded memsharded Jul 28, 2020

Choose a reason for hiding this comment

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

In this case I thought it was better to error, as you can narrow the range. If using lockfiles because you want a high determinism, it seems that version range resolution is not the best. I was close to completely forbid using version ranges for this cases, and raising, but I understand it can be convenient, so I left it, as long as it resolves to only one. Note that this install <ref> --lockfile=conan.lock is typically used with --build=<ref> to re-build affected packages. So it would be a bad thing if the range can resolve to something different. Wdyt @czoido?

@memsharded memsharded merged commit 15e4b45 into conan-io:develop Jul 28, 2020
2 checks passed
@memsharded memsharded deleted the feature/lock_recipe branch Jul 28, 2020
kralicky added a commit to kralicky/conan that referenced this issue Aug 4, 2020
* Feature: add settings for clang-cl (clang on Windows) (conan-io#5705)

* - add settings for clang-cl (clang on Windows)

Signed-off-by: SSE4 <tomskside@gmail.com>

* - add new VS toolsets for Clang

* fix migration test

* Feature/toolchain without dump (conan-io#7435)

* toolchain without dump()

* working

* fixing tests

* relax pluginbase requirements (conan-io#7441)

* New lockfiles iteration. Including version-only lockfiles. (conan-io#7243)

* try to reproduce error in lockfile

* iterate build_order

* package in requires and build_requires

* rename test file

* removing constraint multiple packages

* minor improvements

* first lock-recipe version working

* working

* working

* working 75%, but revisions not managed

* working

* working

* working...

* allow no user/channel match in --build

* build order

* working

* working

* working

* not working...

* working

* tests passing without revisions

* working

* review and patterns for rrevs

* new tests

* some fixes

* more fixes

* skip build-info

* fix revision test msg

* removed global activation of revisions

* multiple br test

* cli changes

* working

* new cli syntax

* fixing tests

* partial lockfiles

* CI partial lock working

* make sure partial lockfiles are used completely and from its root

* version ranges and py_requires working

* partial CI with python_requires

* comment

* tests passing

* working

* working in build_requires

* CI for build-requires test

* recovering conan_build_info tests

* broken py27

* clean-modified, stricter locks

* partial arranged

* minor style fixes

* compacting lockfile search for nodes

* remove unnecessary --build=missing

* processing --update

* testing the --update necessary for revisions non matching

* make the lockfile-out compulsory

* fixed conan_build_info

* forcing --lockfile-out

* workspace change

* Update conans/client/command.py

Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>

* make lock_node.path relative

* new tests and fixes

* remove hardcoded os.environ

* make lockfile-out required

* fix test

* fixing os.path.relpath in Win

* more tests

* fix test

* fix test

* checking --lockfile-out requires --lockfile

* working

* review

* rename get_consumer

* a partial lock can match more than 1 require

* error msg

* working

* check that profile is not passed when using lockfiles

* working

* working

* recover profile_build from lockfile

* add new test for --update

* make sure modified is propagated

* with revisions

* format

* changed build-order order of output

* update cmd line

* review

* Update conans/client/command.py

Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>

* Update conans/client/command.py

Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>

* Update conans/client/command.py

Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>

* forbidding version ranges when using lockfiles, in command line

Co-authored-by: jgsogo <jgsogo@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>

* Support for components in pkg_config generator (conan-io#7413)

* Support for components in pkg_config generator

* capitalize

* remove code not needed

* use real pkg-config for tests

* try without skip

* [feature] Define file name for CMake find generators (conan-io#7320)

* adds `filenames` to cpp_info

Relates to [this issue](conan-io#7254)

* use `filenames` attribute, not name, as prefix to global vars

* `filenames` should fall back to `names`, not package name

* removes debug statements

* Makes `cmake_find_package_multi` work with `filenames` attribute

* adds a test for the filename attribute

* Update find_package generators to not use `filename` in global var names

* change `name` used in cmake_find_package_test, since sharing them isn't possible now

* Set both `{name}_FOUND` and `{filename}_FOUND` vars so code will work

* reverts `filename` of `name` in some spots (danimtb feedback)

* fixes bug in cmake_fine_package_multi_test

* adds a test for changing filename in cmake_find_package_multi generator

* use filename version of _FOUND in if statements...

This allows CMake exported target namespaces to be shared.

* set upper case version of _FOUND vars

* Add Conan version to HTML output (conan-io#7443)

* conan-io#7365 Add Conan version in search table

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* conan-io#7365 Add Conan version in info graph

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* conan-io#7365 Add shebang for python2.7

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* conan-io#7365 Use JS for current date

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* conan-io#7365 Do not rename old tests

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* conan-io#7365 Remove copyright symbol to allow py27

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Refactor filenames and simplify tests (conan-io#7447)

* Refactor filenames and simplify tests

* fix

* small fixes

* review fix

* rename variables

* fix linux tests

* version 1.28.0

* version 1.29.0-dev

* fix migration test

* Hotfix/lockfile errors (conan-io#7453)

* improve error msgs

* better error msgs

* minor fixes to error msgs and better checks

* Fixes bad powershell separators on Linux (conan-io#7472)

* minor improvements in components checks (conan-io#7486)

* fix message missing components (conan-io#7483)

* fix message missing components

* changed error message

Co-authored-by: SSE4 <tomskside@gmail.com>
Co-authored-by: memsharded <james@conan.io>
Co-authored-by: David Roman <davidroman96@gmail.com>
Co-authored-by: jgsogo <jgsogo@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Daniel <danimanzaneque@gmail.com>
Co-authored-by: Tim Simpson <timsimpson4@gmail.com>
Co-authored-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: mjvankampen <mjvk@allseas.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment