Skip to content

Updating outdated proto's will break compatibility on repeating calls #787

Open
@muuvmuuv

Description

@muuvmuuv

What version?

0.49.2

Which command?

proto outdated --update

What happened?

When I define a SemVer range in my .prototools file, calling the command will override the version with the latest it found based on the SemVer range. Now calling it again will, since SemVer is no longer existing, update it to the latest release it finds.

This causes several issues:

  1. Sometimes hardcoded versions (no SemVer range) are required if no update can be done due to upstream issues
  2. Repeating calls could jump between patch and minor releases, which can cause incompatibilities

I would suggest the following:

Install the exact version (or range) as described in the .prototools, do not override the definition, but create a .protolock which includes the "found" upstream versions that have been installed (and pinned) to this project.

On update, check for version (or range) in .prototools, check against .protolock if an update is necessary. Update the .protolock if newer versions are available based on the definition. Never override the definition.

Additionally, I would suggest separating outdated and update, then update could get a flag --latest (like pnpm) which ignores the definition.

Trace logs?

No response

Operating system?

MacOS

Architecture?

arm64

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions