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

lockfiles #5412

Merged
merged 10 commits into from Jul 8, 2019

Conversation

Projects
None yet
3 participants
@memsharded
Copy link
Contributor

commented Jun 27, 2019

Changelog: Feature: Implementation of lockfiles. Lockfiles store in a file all the configuration, exact versions (including revisions), necessary to achieve reproducible builds, even when using version-ranges or package revisions.
Docs: conan-io/docs#1350

--lockfile

  • The main addition to the UI is an argument --lockfile that applies to multiple commands (create, install, info, test) and acts both as input and output
  • Commands that modify a package, like rebuilding it, will modify the lockfile, and that node will be marked as "modified"
  • The default value for --lockfile is the current dir, and the default filename is conan.lock
  • The file must exist when specified --lockfile
  • Commands like conan install . will generate a conan.lock file by default, without needing to specify an output, but won't be used unless --lockfile is specified.
  • The conan.lock lockfile contains a copy of the effective profile

New command conan graph

  • conan graph lock generates a new conan.lock lockfile. This is necessary if we don't want to actually install binaries yet (CI), and the conan info will fail if we try to specify a profile or settings
  • conan graph build-order gets a lockfile and outputs a list of lists in order to be build: Each item has the node ID, not used yet, and the package reference of the node to build
  • conan graph update is able to update a lockfile with another lockfile, that has been modified (like building some of its packages again)
  • conan graph clean-modified removes the "modified" flag from all packages in a lockfile

@memsharded memsharded referenced this pull request Jun 27, 2019

Closed

Feature/graph lock new #5406

@memsharded memsharded marked this pull request as ready for review Jun 28, 2019

@lasote
Copy link
Contributor

left a comment

Almost there!

Show resolved Hide resolved conans/client/command.py Outdated
@@ -917,13 +926,16 @@ def export(self, *args):
"and version are not declared in the conanfile.py")
parser.add_argument('-k', '-ks', '--keep-source', default=False, action='store_true',
help=_KEEP_SOURCE_HELP)
parser.add_argument("-l", "--lockfile", action=OnceArgument, nargs='?', const=".",
help="Path to lockfile. Lockfile will be updated with "

This comment has been minimized.

Copy link
@lasote

lasote Jun 28, 2019

Contributor

Idem

merge_cmd.add_argument('new_lockfile', help='path to modified lockfile')

build_order_cmd = subparsers.add_parser('build-order', help='Returns build-order')
build_order_cmd.add_argument('lockfile', help='lockfile folder')

This comment has been minimized.

Copy link
@lasote

lasote Jun 28, 2019

Contributor

Path to a folder containing a conan.lock file

@lasote lasote added this to the 1.17 milestone Jun 28, 2019

Show resolved Hide resolved conans/client/conan_api.py Outdated
@lasote

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2019

Of course, we need goods docs also. I think the better would be to document the typical usage of the locks with examples. We can describe (later, probably when better tested) in another section the CI flows, recommendations, alternatives... etc.

@lasote

This comment has been minimized.

Copy link
Contributor

commented Jul 4, 2019

What about the suggestions for the command help? Don't you want to change them?

@memsharded

This comment has been minimized.

Copy link
Contributor Author

commented Jul 4, 2019

Actually, the --lockfile argument support also using custom files, so not only the folder, but also different filenames. It was already there, but not tested, I have added some test to have it covered.

@lasote

This comment has been minimized.

Copy link
Contributor

commented Jul 4, 2019

Oh! Then Path to a folder containing a conan.lock file or path to a lock file with any name or similar.

lasote and others added some commits Jul 4, 2019

@lasote
Copy link
Contributor

left a comment

Missing docs!

danimtb and others added some commits Jul 5, 2019

Fix verify_ssl field in SCM discarded when used with False value (#5441)
* Fix verify_ssl field in SCM discarded when used with False value

* Added comment

* leave only None check

* Also discard empty strings to avoid breaking tests
@memsharded

This comment has been minimized.

@lasote lasote merged commit de33bf7 into conan-io:develop Jul 8, 2019

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details

@memsharded memsharded deleted the memsharded:feature/lockfiles branch Jul 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.