jborean93 / PSToml

PowerShell TOML Parser and Writer
MIT License
44 stars 6 forks source link

Migrate to new ALC structure and support WinPS #6

Closed jborean93 closed 11 months ago

jborean93 commented 11 months ago

Migrates to a new Assembly Load Context structure which ensures the dependencies used are the ones shipped with the module. It also ensures that no dependency might accidentially escape the ALC by loading it explicitly inside the ALC.

This also adds limited support for Windows PowerShell 5.1. While WinPS does not support ALCs it can load assemblies side by side removing some of the need for an ALC. There are no guarantees that this will always load our version only that dotnet can load an assembly that matches our required name if present.

codecov[bot] commented 11 months ago

Codecov Report

Attention: 19 lines in your changes are missing coverage. Please review.

Comparison is base (773a026) 95.86% compared to head (e7e1131) 89.15%.

Files Patch % Lines
src/PSToml.Shared/LoadContext.cs 74.35% 6 Missing and 4 partials :warning:
src/PSToml/ConvertToToml.cs 90.62% 5 Missing and 4 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6 +/- ## ========================================== - Coverage 95.86% 89.15% -6.72% ========================================== Files 4 3 -1 Lines 145 212 +67 Branches 0 26 +26 ========================================== + Hits 139 189 +50 - Misses 6 14 +8 - Partials 0 9 +9 ``` | [Flag](https://app.codecov.io/gh/jborean93/PSToml/pull/6/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | Coverage Δ | | |---|---|---| | [PS_7.2_x64_Linux](https://app.codecov.io/gh/jborean93/PSToml/pull/6/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `89.15% <86.02%> (-6.72%)` | :arrow_down: | | [PS_7.2_x64_Windows](https://app.codecov.io/gh/jborean93/PSToml/pull/6/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `?` | | | [PS_7.3_x64_Linux](https://app.codecov.io/gh/jborean93/PSToml/pull/6/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `?` | | | [PS_7.3_x64_Windows](https://app.codecov.io/gh/jborean93/PSToml/pull/6/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `?` | | | [PS_7.4_x64_Linux](https://app.codecov.io/gh/jborean93/PSToml/pull/6/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `89.15% <86.02%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.