fsprojects / fsprojects/Paket

RFC: Reference Version Constraints in paket.template

Open
#3,684 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Problem

In paket.template files I can reference the currently build version (via CURRENTVERSION) and the package's resolved version from paket.lock (via LOCKEDVERSION). I'd like to reference the complete version constraint from paket.dependencies (e.g. via VERSIONCONSTRAINT) as well.

When using type project templates, the version constraints from paket.dependencies are used per default, CURRENTVERSION is controlled via interproject-references and LOCKEDVERSION via lock-dependencies. For type file I see no way to access the original version constraint from paket.depenencies, though.

Proposal

Introduce VERSIONCONSTRAINT as a placeholder for the complete version constraint from paket.dendencies, including the optional "-group" suffix like in LOCKEDVERSION.

Example:

dependencies
   FSharp.Core VERSIONCONSTRAINT   # equivalent to VERSIONCONSTRAINT-Main
Known Workaround

Right now one has to duplicate the version constraint, either by manually copying it or by reconstructing using the existing placeholders, e.g. ~> LOCKED:Minor .
Especially for complex constraints, this is a hassle.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how placeholders in paket.template are parsed and resolved against paket.dependencies and paket.lock, with attention to type file templates and the optional group suffix used by LOCKEDVERSION. Done means VERSIONCONSTRAINT expands to the complete original constraint, including its group suffix, and supports the example dependency declaration.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.