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
lockfiles #5412
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there!
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 " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path to a folder containing a conan.lock file
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. |
What about the suggestions for the command help? Don't you want to change them? |
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. |
Oh! Then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing docs!
…an-io#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
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
--lockfile
that applies to multiple commands (create, install, info, test) and acts both as input and output--lockfile
is the current dir, and the default filename isconan.lock
--lockfile
conan install .
will generate aconan.lock
file by default, without needing to specify an output, but won't be used unless--lockfile
is specified.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 theconan info
will fail if we try to specify a profile or settingsconan 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 buildconan 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