fsprojects / fsprojects/Paket

[Feature proposal] Automatically save `show-installed-packages` after install/update

Open
#3,795 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

Scenario:

I have a repo containing multiple projects, each one of which gets turned into a NuGet package by our CI system. The CI only builds and publishes a package if there have been any changes in that particular project's folder.

For source code changes, this works fine. But if I update one or more dependencies with paket update, the only file changed is the global paket.lock.

If I update a dependency that's only used by some of the packages, I would want to only trigger the CI/CD for the affected packages, instead of all of them. (Especially because some of the packages are themselves NuGet dependencies of others.)

The command paket show-installed-packages generates a suitable file for this purpose, if I run it separately for each project and save to a log file.

I'm currently using a script that runs paket update and then regenerates the installed packages log files (which I've called paket.referenced):

gci -r *.??proj | %{ paket show-installed-packages --project $_.FullName --log-file "$($_.DirectoryName)/paket.referenced" }

Since there is a generate_load_scripts flag in paket.dependencies, I think it would make sense to have a similar flag that generates a list of direct dependencies with their resolved numbers in the project folder. I'm not sure about a sufficiently expressive name for this flag - generate_installed_packages sounds like it generates packages instead of a log file.

Do you think such a feature would make sense in Paket? I would give a shot at implementing it myself in that case.

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 with the existing show-installed-packages command and the paket.dependencies handling for the generate_load_scripts flag. Compare the PowerShell example's per-project --log-file output with the requested automatic behavior after install or update. Done means a dependency declaration can generate direct-package logs with resolved versions for affected projects.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.