Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add net481 support #4227

Merged
merged 4 commits into from
Nov 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add net481 definitions.
  • Loading branch information
ChrSteinert committed Sep 25, 2023
commit 7b290cca0d368797d074089341b8477ae3e3bf19
6 changes: 6 additions & 0 deletions src/Paket.Core/Versioning/FrameworkHandling.fs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 269,7 @@ type FrameworkVersion =
| V4_7_1
| V4_7_2
| V4_8
| V4_8_1
| V5
| V6
| V7
Expand All @@ -294,6 295,7 @@ type FrameworkVersion =
| V4_7_1 -> "v4.7.1"
| V4_7_2 -> "v4.7.2"
| V4_8 -> "v4.8"
| V4_8_1 -> "v4.8.1"
| V5 -> "v5.0"
| V6 -> "v6.0"
| V7 -> "v7.0"
Expand All @@ -320,6 322,7 @@ type FrameworkVersion =
| FrameworkVersion.V4_7_1 -> "471"
| FrameworkVersion.V4_7_2 -> "472"
| FrameworkVersion.V4_8 -> "48"
| FrameworkVersion.V4_8_1 -> "481"
| FrameworkVersion.V5 -> "5.0"
| FrameworkVersion.V6 -> "6.0"
| FrameworkVersion.V7 -> "7.0"
Expand All @@ -346,6 349,7 @@ type FrameworkVersion =
| "4.7.1" -> Some FrameworkVersion.V4_7_1
| "4.7.2" -> Some FrameworkVersion.V4_7_2
| "4.8" -> Some FrameworkVersion.V4_8
| "4.8.1" -> Some FrameworkVersion.V4_8_1
| "5" -> Some FrameworkVersion.V5
| "6" -> Some FrameworkVersion.V6
| "7" -> Some FrameworkVersion.V7
Expand Down Expand Up @@ -919,6 923,7 @@ type FrameworkIdentifier =
| DotNetFramework FrameworkVersion.V4_7_1 -> [ DotNetFramework FrameworkVersion.V4_7; DotNetStandard DotNetStandardVersion.V2_0 ]
| DotNetFramework FrameworkVersion.V4_7_2 -> [ DotNetFramework FrameworkVersion.V4_7_1 ]
| DotNetFramework FrameworkVersion.V4_8 -> [ DotNetFramework FrameworkVersion.V4_7_2 ]
| DotNetFramework FrameworkVersion.V4_8_1 -> [ DotNetFramework FrameworkVersion.V4_7_2 ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a missing fallback to 4_8 here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather, 4_8 should replace 4_7_2 here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed as requested. Tough I do not fully understand, what that functions intent is…

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% clear, but it is setup like a fallback, and has this comment:

// returns a list of compatible platforms that this platform also supports

I always followed the same pattern of putting the previous version, without skipping or adding more than necessary, I assume some code does a directed graph, and that it allows .net framework v4.8 to be ok with packages that only say v3.5 for example.

Without the adjustment you just made, it may not be possible to reference v4.8 in v4.8.1.

Disclaimer: I've not followed how this is used in the codebase.

| DotNetFramework FrameworkVersion.V5 -> [ DotNetCoreApp DotNetCoreAppVersion.V3_1; DotNetStandard DotNetStandardVersion.V2_1 ]
| DotNetFramework FrameworkVersion.V6 -> [ DotNetFramework FrameworkVersion.V5 ]
| DotNetFramework FrameworkVersion.V7 -> [ DotNetFramework FrameworkVersion.V6 ]
Expand Down Expand Up @@ -1512,6 1517,7 @@ module KnownTargetProfiles =
FrameworkVersion.V4_7_1
FrameworkVersion.V4_7_2
FrameworkVersion.V4_8
FrameworkVersion.V4_8_1
FrameworkVersion.V5
FrameworkVersion.V6
FrameworkVersion.V7
Expand Down