Skip to content

with get c.<pkg> silently bumps an existing pin, and the lock then overrides with.toml #2355

Closed

Description

@ehartford

Observed in a project whose with.toml pins c.sdl = "3.4.14" (wipe, at e4861e1), on a fresh checkout with no .with/:

  1. with get c.sdl, the command the project's README gives, installed 3.4.16 and rewrote with.toml to c.sdl = "3.4.16" ("added [email protected]"). A bare package name replaced an existing pin without saying so.
  2. After restoring with.toml (c.sdl = "3.4.14"), with get with no arguments printed restored [email protected] (cached). The lock that step 1 wrote won over the manifest, so the manifest's pin and the installed version disagreed silently.
  3. Only with get [email protected] (after deleting .with/) installed the pinned version.

Expected:

  • with get c.<name> for a dependency the manifest already pins installs the pinned version. If it changes the pin, it says so (c.sdl: 3.4.14 -> 3.4.16), or it refuses and tells you to name a version.
  • with get honors the manifest. When the manifest and the lock disagree, the lock is stale: re-resolve from the manifest, or refuse loudly. Never restore the lock's version silently.

Why it matters: a pin is the project's statement of what it builds against. A silent bump shipped a different SDL than the one the project was tested with, and the README's own instructions trigger it.

Workaround used: rm -rf .with, then with get [email protected] and with get [email protected].

Activity

  1. ehartford commented on Oct 25, 2026

    @ehartford
    ContributorAuthor

    Triage 2026-10-25, with v0.15.3.0 (main a261b65): reproduced, both halves.

    $ with init . && with get [email protected]
    added [email protected]
    $ with get c.zlib
    added [email protected]
    $ grep zlib with.toml
    c.zlib = "1.3.2"           # the pin was replaced, reported as "added"
    $ # restore with.toml to c.zlib = "1.3.1", then:
    $ with get
    restored [email protected] (cached)
    $ grep zlib with.toml
    c.zlib = "1.3.1"           # the lock overrides the manifest
    

    pre-release: the documented with get flow silently changes and then ignores a user's pin.

  2. ehartford commented on Oct 25, 2026

    @ehartford
    ContributorAuthor

    Fixed on main by 2396bc9 (PR #2654, stack #2658; battery green on the stack top 48c1c72). The commit message names the root-cause line and the regression test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions