Skip to content

Commit 68fef88

Browse files
authored
Release notes proposal (dotnet#16377)
1 parent dd610a6 commit 68fef88

File tree

17 files changed

+272
-22
lines changed

17 files changed

+272
-22
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ Fixes # (issue, if applicable)
99
- [ ] Test cases added
1010
- [ ] Performance benchmarks added in case of performance changes
1111
- [ ] Release notes entry updated:
12-
> Please make sure to add an entry with short succint description of the change as well as link to this pull request to the respective release notes file, if applicable.
12+
> Please make sure to add an entry with short succinct description of the change as well as link to this pull request to the respective release notes file, if applicable.
1313
>
1414
> Release notes files:
15-
> - If anything under `src/Compiler` has been changed, please make sure to make an entry in `docs/release-notes/FSharp.Compiler.Service/<version>.md`, where `<version>` is usually "highest" one, e.g. `42.8.200`
16-
> - If language feature was added (i.e. `LanguageFeatures.fsi` was changed), please add it to `docs/releae-notes/Language/preview.md`
17-
> - If a change to `FSharp.Core` was made, please make sure to edit `docs/release-notes/FSharp.Core/<version>.md` where version is "highest" one, e.g. `8.0.200`.
15+
> - If anything under `src/Compiler` has been changed, please make sure to make an entry in `docs/release-notes/.FSharp.Compiler.Service/<version>.md`, where `<version>` is usually "highest" one, e.g. `42.8.200`
16+
> - If language feature was added (i.e. `LanguageFeatures.fsi` was changed), please add it to `docs/releae-notes/.Language/preview.md`
17+
> - If a change to `FSharp.Core` was made, please make sure to edit `docs/release-notes/.FSharp.Core/<version>.md` where version is "highest" one, e.g. `8.0.200`.
1818
19-
> Examples of release notes entries:
20-
> - Respect line limit in quick info popup - https://github.com/dotnet/fsharp/pull/16208
21-
> - More inlines for Result module - https://github.com/dotnet/fsharp/pull/16106
22-
> - Miscellaneous fixes to parens analysis - https://github.com/dotnet/fsharp/pull/16262
23-
>
19+
> Information about the release notes entries format can be found in the [documentation](https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html).
20+
> Example:
21+
> * More inlines for Result module. ([PR #16106](https://github.com/dotnet/fsharp/pull/16106))
22+
> * Correctly handle assembly imports with public key token of 0 length. ([Issue #16359](https://github.com/dotnet/fsharp/issues/16359), [PR #16363](https://github.com/dotnet/fsharp/pull/16363))
23+
> *`while!` ([Language suggestion #1038](https://github.com/fsharp/fslang-suggestions/issues/1038), [PR #14238](https://github.com/dotnet/fsharp/pull/14238))
2424
2525
> **If you believe that release notes are not necessary for this PR, please add `NO_RELEASE_NOTES` label to the pull request.**

.github/workflows/check_release_notes.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ jobs:
8585
[[ "$VISUAL_STUDIO_VERSION" =~ ^[0-9]+\.[0-9]+$ ]] || (echo " Invalid Visual Studio Version parsed"; exit 1)
8686
8787
_release_notes_base_path='docs/release-notes'
88-
_fsharp_core_release_notes_path="${_release_notes_base_path}/FSharp.Core/${FSHARP_CORE_VERSION}.md"
89-
_fsharp_compiler_release_notes_path="${_release_notes_base_path}/FSharp.Compiler.Service/${FSHARP_CORE_VERSION}.md"
90-
_fsharp_language_release_notes_path="${_release_notes_base_path}/Language/preview.md"
91-
_fsharp_vs_release_notes_path="${_release_notes_base_path}/VisualStudio/${VISUAL_STUDIO_VERSION}.md"
88+
_fsharp_core_release_notes_path="${_release_notes_base_path}/.FSharp.Core/${FSHARP_CORE_VERSION}.md"
89+
_fsharp_compiler_release_notes_path="${_release_notes_base_path}/.FSharp.Compiler.Service/${FSHARP_CORE_VERSION}.md"
90+
_fsharp_language_release_notes_path="${_release_notes_base_path}/.Language/preview.md"
91+
_fsharp_vs_release_notes_path="${_release_notes_base_path}/.VisualStudio/${VISUAL_STUDIO_VERSION}.md"
9292
9393
readonly paths=(
9494
"src/FSharp.Core|${_fsharp_core_release_notes_path}"

docs/content/fsdocs-theme.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:root {
2+
--main-menu-width: 300px;
3+
}

docs/img/favicon.ico

105 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Fixed
2+
3+
* Include the `get,set` keywords in the range of `SynMemberDefn.AutoProperty`. ([PR #15835](https://github.com/dotnet/fsharp/pull/15835))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### Fixed
2+
3+
* Miscellaneous fixes to parentheses analysis. ([PR #16262](https://github.com/dotnet/fsharp/pull/16262), [PR #16391](https://github.com/dotnet/fsharp/pull/16391), [PR #16370](https://github.com/dotnet/fsharp/pull/16370), [PR #16395](https://github.com/dotnet/fsharp/pull/16395))
4+
* Correctly handle assembly imports with public key token of 0 length. ([Issue #16359](https://github.com/dotnet/fsharp/issues/16359), [PR #16363](https://github.com/dotnet/fsharp/pull/16363))
5+
6+
### Added
7+
* Raise a new error when interfaces with auto properties are implemented on constructor-less types. ([PR #16352](https://github.com/dotnet/fsharp/pull/16352))
8+
* Allow usage of `[<TailCall>]` with older `FSharp.Core` package versions. ([PR #16373](https://github.com/dotnet/fsharp/pull/16373))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Added
2+
3+
* More inlines for Result module. ([PR #16106](https://github.com/dotnet/fsharp/pull/16106))

docs/release-notes/.Language/8.0.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Added
2+
3+
* `while!` ([Language suggestion #1038](https://github.com/fsharp/fslang-suggestions/issues/1038), [PR #14238](https://github.com/dotnet/fsharp/pull/14238))
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Added
2+
3+
* Better generic unmanaged structs handling. ([Language suggestion #692](https://github.com/fsharp/fslang-suggestions/issues/692), [PR #12154](https://github.com/dotnet/fsharp/pull/12154))
4+
* Bidirectional F#/C# interop for 'unmanaged' constraint. ([PR #12154](https://github.com/dotnet/fsharp/pull/12154))

docs/release-notes/.aux/Common.fsx

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#r "nuget: Markdig, 0.33.0"
2+
#r "nuget: FsHttp, 12.1.0"
3+
4+
open System.IO
5+
open System.Xml.Linq
6+
open System.Text.RegularExpressions
7+
open FsHttp
8+
9+
let versionProps = Path.Combine(__SOURCE_DIRECTORY__, "../../../eng/Versions.props")
10+
let versionPropsDoc = XDocument.Load(versionProps)
11+
12+
/// Find all published versions of a package on NuGet
13+
let getAvailableNuGetVersions (packageName: string) : Set<string> =
14+
let packageName = packageName.ToLowerInvariant()
15+
16+
http { GET $"https://api.nuget.org/v3-flatcontainer/%s{packageName}/index.json" }
17+
|> Request.send
18+
|> Response.deserializeJson<{| versions: string array |}>
19+
|> fun json -> Set.ofArray json.versions
20+
21+
/// Try and find the publish date on NuGet
22+
let tryGetReleaseDate (packageName: string) (version: string) : string option =
23+
let packageName = packageName.ToLowerInvariant()
24+
25+
http { GET $"https://api.nuget.org/v3/registration5-gz-semver2/%s{packageName}/%s{version}.json" }
26+
|> Request.send
27+
|> Response.deserializeJson<{| published: string |}>
28+
|> fun json ->
29+
if System.String.IsNullOrWhiteSpace json.published then
30+
None
31+
else
32+
Some(json.published.Split('T').[0])
33+
34+
/// In order for the heading to appear in the page content menu in fsdocs,
35+
/// they need to follow a specific HTML structure.
36+
let transformH3 (version: string) (input: string) : string =
37+
let pattern = "<h3>(.*?)</h3>"
38+
39+
let replacement =
40+
$"<h3><a name=\"%s{version}-$1\" class=\"anchor\" href=\"#%s{version}-$1\">$1</a></h3>"
41+
42+
Regex.Replace(input, pattern, replacement)
43+
44+
/// Process all MarkDown files from the given release folder
45+
let processFolder (path: string) (processFile: string -> string) : string =
46+
Directory.EnumerateFiles(path, "*.md")
47+
|> Seq.sortByDescending Path.GetFileNameWithoutExtension
48+
|> Seq.map processFile
49+
|> String.concat "\n"

docs/release-notes/About.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
category: Release Notes
3+
categoryindex: 600
4+
index: 1
5+
title: About
6+
---
7+
8+
# About
9+
10+
The release notes for the [F\# language](./Language.md), [FSharp.Core](./FSharp.Core.md) and [FSharp.Compiler.Service](./FSharp.Compiler.Service.md) are based on the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format.
11+
The target audience of these release notes are the respective end-users.
12+
13+
## Writing a changelog entry
14+
15+
In order to keep the change logs consistent the following format was proposed for each entry:
16+
17+
```md
18+
* <Informative description>. ([PR #16106](https://github.com/dotnet/fsharp/pull/16106))
19+
```
20+
21+
Some tips:
22+
23+
* Use valid [Markdown](https://www.markdownguide.org/).
24+
* Use `*` as bullet point symbol. We don't want to mix `*` and `-`.
25+
* Start your description with a capital and end the sentence with a dot.
26+
* **Always** include a link to your pull request before the closing `)`, `([PR #16106](https://github.com/dotnet/fsharp/pull/16106))`.
27+
* Optionally, include a link to an issue on `dotnet/fsharp` use `Issue #number` before the link to the pull request.
28+
29+
Example:
30+
31+
```md
32+
* Correctly handle assembly imports with public key token of 0 length. ([Issue #16359](https://github.com/dotnet/fsharp/issues/16359), [PR #16363](https://github.com/dotnet/fsharp/pull/16363))
33+
```
34+
35+
* Optionally, include a link to a language suggestion from `dotnet/fsharp` use `Language suggestion #number` before the link to the pull request.
36+
37+
Example:
38+
39+
```md
40+
* `while!` ([Language suggestion #1038](https://github.com/fsharp/fslang-suggestions/issues/1038), [PR #14238](https://github.com/dotnet/fsharp/pull/14238))
41+
```
42+
43+
* Choose the right section for your type of change. (`## Added`, `## Changed`, `## Deprecated`, `## Removed`, `## Fixed` or `## Security`).
44+
* Ensure your description makes it clear what the change is about. The reader should be informed on a high level without needing to click through the pull request link and find out in the code what actually changed.
45+
* Maintainers or other contributors might rewrite your changelog entry in the future. This might be done when multiple pull requests can be consolidated under the same umbrella.
46+
* Related pull requests can be listed in the same entry when it makes sense.
47+
48+
Example:
49+
50+
```md
51+
* Miscellaneous fixes to parentheses analysis. ([PR #16262](https://github.com/dotnet/fsharp/pull/16262), [PR #16391](https://github.com/dotnet/fsharp/pull/16391), [PR #16370](https://github.com/dotnet/fsharp/pull/16370))
52+
```
53+
54+
## The release process
55+
56+
### General
57+
58+
How does it work? Different stages/phases?
59+
60+
#### FSharp.Compiler.Service
61+
62+
Perhaps add some specific info if available?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
(** ---
2+
category: Release Notes
3+
categoryindex: 600
4+
index: 4
5+
title: FSharp.Compiler.Service
6+
---
7+
8+
# FSharp.Compiler.Service
9+
*)
10+
(*** hide ***)
11+
#load "./.aux/Common.fsx"
12+
13+
open System.IO
14+
open System.Xml.XPath
15+
open Markdig
16+
open Common
17+
18+
let path = Path.Combine(__SOURCE_DIRECTORY__, ".FSharp.Compiler.Service")
19+
let fcsMajorVersion = versionPropsDoc.XPathSelectElement("//FCSMajorVersion").Value
20+
let nugetPackage = "FSharp.Compiler.Service"
21+
let availableNuGetVersions = getAvailableNuGetVersions nugetPackage
22+
23+
processFolder path (fun file ->
24+
let versionInFileName = Path.GetFileNameWithoutExtension(file)
25+
// Example: 8.0.200
26+
let versionParts = versionInFileName.Split '.'
27+
28+
let version = $"%s{fcsMajorVersion}.%s{versionParts.[0]}.%s{versionParts.[2]}"
29+
// TODO: Can we determine if the current version is in code freeze based on the Version.props info?
30+
let title =
31+
if not (availableNuGetVersions.Contains version) then
32+
$"%s{version} - Unreleased"
33+
else
34+
match tryGetReleaseDate nugetPackage version with
35+
| None -> $"%s{version} - Unreleased"
36+
| Some d -> $"%s{version} - %s{d}"
37+
38+
let nugetBadge =
39+
if not (availableNuGetVersions.Contains version) then
40+
System.String.Empty
41+
else
42+
$"<a href=\"https://www.nuget.org/packages/%s{nugetPackage}/%s{version}\" target=\"_blank\"><img alt=\"Nuget\" src=\"https://img.shields.io/badge/NuGet-%s{version}-blue\"></a>"
43+
44+
let content = File.ReadAllText file |> Markdown.ToHtml |> transformH3 version
45+
46+
$"""<h2><a name="%s{version}" class="anchor" href="#%s{version}">%s{title}</a></h2>%s{nugetBadge}%s{content}""")
47+
(*** include-it-raw ***)

docs/release-notes/FSharp.Compiler.Service/8.0.200.md

-7
This file was deleted.

docs/release-notes/FSharp.Core.fsx

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
(** ---
2+
category: Release Notes
3+
categoryindex: 600
4+
index: 3
5+
title: FSharp.Core
6+
---
7+
8+
# FSharp.Core
9+
*)
10+
(*** hide ***)
11+
#load "./.aux/Common.fsx"
12+
13+
open System.IO
14+
open Markdig
15+
open Common
16+
17+
let path = Path.Combine(__SOURCE_DIRECTORY__, ".FSharp.Compiler.Service")
18+
let nugetPackage = "FSharp.Core"
19+
let availableNuGetVersions = getAvailableNuGetVersions nugetPackage
20+
21+
processFolder path (fun file ->
22+
let version = Path.GetFileNameWithoutExtension(file)
23+
24+
// TODO: Can we determine if the current version is in code freeze based on the Version.props info?
25+
let title =
26+
if not (availableNuGetVersions.Contains version) then
27+
$"%s{version} - Unreleased"
28+
else
29+
match tryGetReleaseDate nugetPackage version with
30+
| None -> $"%s{version} - Unreleased"
31+
| Some d -> $"%s{version} - %s{d}"
32+
33+
let nugetBadge =
34+
if not (availableNuGetVersions.Contains version) then
35+
System.String.Empty
36+
else
37+
$"<a href=\"https://www.nuget.org/packages/%s{nugetPackage}/%s{version}\" target=\"_blank\"><img alt=\"Nuget\" src=\"https://img.shields.io/badge/NuGet-%s{version}-blue\"></a>"
38+
39+
let content = File.ReadAllText file |> Markdown.ToHtml |> transformH3 version
40+
41+
$"""<h2><a name="%s{version}" class="anchor" href="#%s{version}">%s{title}</a></h2>%s{nugetBadge}%s{content}""")
42+
(*** include-it-raw ***)

docs/release-notes/FSharp.Core/8.0.200.md

-1
This file was deleted.

docs/release-notes/Language.fsx

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
(** ---
2+
category: Release Notes
3+
categoryindex: 600
4+
index: 2
5+
title: F# Language
6+
---
7+
8+
# F\# Language
9+
*)
10+
(*** hide ***)
11+
#load "./.aux/Common.fsx"
12+
13+
open System.IO
14+
open Markdig
15+
open Common
16+
17+
let path = Path.Combine(__SOURCE_DIRECTORY__, ".Language")
18+
19+
Directory.EnumerateFiles(path, "*.md")
20+
|> Seq.sortWith (fun a b ->
21+
let a = Path.GetFileNameWithoutExtension a
22+
let b = Path.GetFileNameWithoutExtension b
23+
24+
match a, b with
25+
| "preview", "preview" -> 0
26+
| "preview", _ -> -1
27+
| _, "preview" -> 1
28+
| _, _ -> compare (int b) (int a))
29+
|> Seq.map (fun file ->
30+
let version = Path.GetFileNameWithoutExtension(file)
31+
let version = if version = "preview" then "Preview" else version
32+
let content = File.ReadAllText file |> Markdown.ToHtml |> transformH3 version
33+
$"""<h2><a name="%s{version}" class="anchor" href="#%s{version}">%s{version}</a></h2>%s{content}""")
34+
|> String.concat "\n"
35+
(*** include-it-raw ***)

docs/release-notes/Language/preview.md

-1
This file was deleted.

0 commit comments

Comments
 (0)