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

[suggestion] graph lock node using relative path #7063

Closed
refactorTractor opened this issue May 21, 2020 · 3 comments · Fixed by #7243
Closed

[suggestion] graph lock node using relative path #7063

refactorTractor opened this issue May 21, 2020 · 3 comments · Fixed by #7243
Assignees
Projects
Milestone

Comments

@refactorTractor
Copy link

The graph lock inside the conan.lock file (that is generated in the install_folder when you issue a conan install command) can be used to have reproducible builds for a project's dependencies. It follows, that one would want this file committed to source control.

The root node in the graph lock always refers to the conanfile.txt in the path node attribute. This path is always an absolute path to that file. This could differ between developers' setups (because they often store source repositories on different paths).

Though a wrong path in the lock file will not disturb an install command, it is possible that conan will overwrite this attribute, causing unnecessary/unwarranted diffs.

This was the behavior I've observed with 1.23.0, our project hasn't yet updated.

I propose that conan allow the graph lock root node's path to be a relative path from the lock file's location. This is most likely going to be the same among development setups, and no unwanted diffs are created. I don't mind if this feature would be opt-in via command line option to maintain backwards compatibility.

@refactorTractor
Copy link
Author

Is there any additional info I should provide?

@memsharded
Copy link
Member

Hi @AGreat1

No, it is clear, I am preparing a big change of lockfiles for 1.28, let me have a look, will try to include this.

@memsharded
Copy link
Member

It has been included in #7243, for Conan 1.28

Please keep tuned to the 1.28 release, many things are going to change in lockfiles. It will also be possible to lock the versions only (not the full lock with the binary package-ids and the profiles), which might be something useful if you plan to add it to version control (instead of having to commit every lockfile for every configuration), depending on what you want to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Lockfile
Awaiting triage
Development

Successfully merging a pull request may close this issue.

2 participants