Skip to content

Adding new fields to the lockfile throws an error asking the user to delete it and rebuild #19105

@Wyverald

Description

@Wyverald

from @keith:

i saw this case today which appeared to happen because 1 version wrote the lockfile then a newer version read it:

ERROR: Error computing the main repository mapping: Failed to read and parse the MODULE.bazel.lock file with error: Null envVariables. Try deleting it and rerun the build.

We should properly deal with new fields being added to the lockfile mechanism (treat them as empty) and not just throw everything out the window. Especially, asking the user to delete the lockfile should be a last resort.

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)area-BzlmodBzlmod-specific PRs, issues, and feature requeststeam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: bug

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions