PowerShell / PowerShell/PSScriptAnalyzer

Download compatibility profiles lazily from a remote feed rather than shipping them

Aperta
#1,148 4 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Area - Rules Issue - Enhancement
Lingua principale
C#
Stelle
2.2k
Fork
414
Merge medio
13h 1m
PR unite (30g)
2

Descrizione

Currently compatibility profiles for the UseCompatibleTypes and UseCompatibleCommands rules ship with PSSA and effectively double its size.

This represents large overhead for users who don't use these rules or who don't want all the profiles we ship by default.

Ideally the rules should have a way of identifying filesystem and remote assets, and when rules are run, download/install any remote assets not already on the machine. This will also require cataloguing remote assets in a systematic and dependable way.

Proposed implementation

One solution is to have rules as NuGet assets (taking care of both hosting and caching), and specifying profiles as URIs, so that file:// and https:// (for example) profiles can be easily distinguished.

This may create an unnecessary dependency on NuGet however.

Whatever the implementation it will need to:

  • Enable runtime retrieval of profiles so they do not need to be shipped with the PSSA module
  • Allow side-by-side specification of remote and local profiles in the configuration in a way where local assets cannot have colliding names
  • Memoise profile downloads, so that once they are downloaded once, they remain available locally by specifying the remote instance (this may require versioning or cache invalidation in case remote profiles change)
  • Allow profiles to be downloaded in batches rather than one-at-a-time, for maximum efficiency (in the vein of the Remote Façade pattern.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Esamina le regole UseCompatibleTypes e UseCompatibleCommands e il modo in cui i relativi profili sono attualmente pacchettizzati e configurati. Trasforma in un design i requisiti relativi all’origine degli asset, al caching e al versioning, alle collisioni dei nomi locali e ai download batch. Il lavoro è completato quando i comportamenti elencati di recupero e coesistenza a runtime sono specificati e validati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, powershell
Ambito
tooling
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.