PowerShell / PowerShell/PSScriptAnalyzer
Download compatibility profiles lazily from a remote feed rather than shipping them
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 414
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the UseCompatibleTypes and UseCompatibleCommands rules and how their profiles are currently packaged and configured. Map the asset source, caching and versioning, local-name collision, and batch-download requirements into a design. Done means the listed runtime retrieval and coexistence behaviors are specified and validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100