Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Split project.lock.json into *.lock.json and *.cache.json #2332

Closed
@Mpdreamz

Description

@Mpdreamz

I've read this gist on checking in project.lock files a couple times over and I really feel the current locking design feels optimized for the wrong scenario: finding breaking changes in moving targets. Whereas the more important default scenario should be repeatable builds.

To the best of my understanding the current project.json.lock now serves two purposes, caching the files in play for compilation and optionally locking dependencies using --lock.

This results in a bit of a operational kerfuffle. When do i need to restore using --lock ? Do I need to unignore lock files in release tags, and if so is this not important on dev branch too? if I branch of those tags should i remove the lock file on the first change?

What if locking is simply the norm just as it is in Paket?

Restore writes a very minimal project.lock.json (look at Paket for an example) if not present that you should always commit (eradicating both --lock and lock:false confusion).

When dnx runs the app for the first time it will generate a .project.cache.json which you should never commit.

If folks want to check fast moving targets on a CI server they could do dnu restore --latest on the CI servers explicitly.

  • dnu restore --latest updates all * dependencies
  • dnu restore --update updates all dependencies to latest
  • dnu restore --outdated simply reports on packages that are outdated

To be fair the wiki does not dictate not checking project.lock.json files but does leave it up in the air without a consistent story.

Even if we do not make locking the norm a split will really help those who do choose to commit the lock file to not be faced with merge conflicts in the cached files section of this lock file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions