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

Release notes proposal #16377

Merged
merged 28 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
80578f2
Move version-specific file into single CHANGELOG file.
nojaf Dec 4, 2023
55ee0c8
Override main menu width from theme.
nojaf Dec 4, 2023
06e8874
Propose keep a changelog format.
nojaf Dec 4, 2023
be9dc2b
Add missing favicon.
nojaf Dec 4, 2023
6238bd5
Update release notes check.
nojaf Dec 4, 2023
28d917d
Fix language header.
nojaf Dec 4, 2023
50770d9
Merge branch 'main' into release-notes-proposal
nojaf Dec 5, 2023
c682759
Restore original version files.
nojaf Dec 5, 2023
f30507b
Remove unused script.
nojaf Dec 5, 2023
ae63127
Compose single release overview for FSharp.Core.
nojaf Dec 5, 2023
74eddeb
Compose language page.
nojaf Dec 5, 2023
125c790
Add placeholders for documentation.
nojaf Dec 5, 2023
67a7df7
Update paths in bash script.
nojaf Dec 5, 2023
66c6bae
Add full example of Issue + PR link and Language suggestion + PR link.
nojaf Dec 5, 2023
a697451
Explain people might rewrite your changelog entry.
nojaf Dec 5, 2023
885da17
Update pull request template.
nojaf Dec 5, 2023
2dc5512
Merge branch 'main' into release-notes-proposal
nojaf Dec 5, 2023
e851cab
Merge branch 'main' into release-notes-proposal
nojaf Dec 6, 2023
e60d936
Merge branch 'main' into release-notes-proposal
nojaf Dec 6, 2023
179d506
Merge branch 'main' into release-notes-proposal
nojaf Dec 8, 2023
8f4cc2a
Multiple PRs in one entry.
nojaf Dec 8, 2023
00f1cad
Merge branch 'main' into release-notes-proposal
nojaf Dec 11, 2023
80598db
Add entry about new error when interfaces with auto properties
nojaf Dec 11, 2023
bebadc3
optionally
nojaf Dec 11, 2023
9dfd116
Merge branch 'release-notes-proposal' of https://github.com/nojaf/fsh…
nojaf Dec 11, 2023
f4cef95
Merge branch 'main' into release-notes-proposal
nojaf Dec 12, 2023
f49cdb3
Merge branch 'main' into release-notes-proposal
nojaf Dec 14, 2023
6d04c56
Merge branch 'release-notes-proposal' of https://github.com/nojaf/fsh…
nojaf Dec 14, 2023
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
18 changes: 9 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ Fixes # (issue, if applicable)
- [ ] Test cases added
- [ ] Performance benchmarks added in case of performance changes
- [ ] Release notes entry updated:
> 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.
> 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.
>
> Release notes files:
> - 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`
> - If language feature was added (i.e. `LanguageFeatures.fsi` was changed), please add it to `docs/releae-notes/Language/preview.md`
> - 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`.
> - 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`
> - If language feature was added (i.e. `LanguageFeatures.fsi` was changed), please add it to `docs/releae-notes/.Language/preview.md`
> - 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`.

> Examples of release notes entries:
> - Respect line limit in quick info popup - https://github.com/dotnet/fsharp/pull/16208
> - More inlines for Result module - https://github.com/dotnet/fsharp/pull/16106
> - Miscellaneous fixes to parens analysis - https://github.com/dotnet/fsharp/pull/16262
>
> Information about the release notes entries format can be found in the [documentation](https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html).
> Example:
> * More inlines for Result module. ([PR #16106](https://github.com/dotnet/fsharp/pull/16106))
> * 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))
> *`while!` ([Language suggestion #1038](https://github.com/fsharp/fslang-suggestions/issues/1038), [PR #14238](https://github.com/dotnet/fsharp/pull/14238))

> **If you believe that release notes are not necessary for this PR, please add `NO_RELEASE_NOTES` label to the pull request.**
8 changes: 4 additions & 4 deletions .github/workflows/check_release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ jobs:
[[ "$VISUAL_STUDIO_VERSION" =~ ^[0-9]+\.[0-9]+$ ]] || (echo " Invalid Visual Studio Version parsed"; exit 1)

_release_notes_base_path='docs/release-notes'
_fsharp_core_release_notes_path="${_release_notes_base_path}/FSharp.Core/${FSHARP_CORE_VERSION}.md"
_fsharp_compiler_release_notes_path="${_release_notes_base_path}/FSharp.Compiler.Service/${FSHARP_CORE_VERSION}.md"
_fsharp_language_release_notes_path="${_release_notes_base_path}/Language/preview.md"
_fsharp_vs_release_notes_path="${_release_notes_base_path}/VisualStudio/${VISUAL_STUDIO_VERSION}.md"
_fsharp_core_release_notes_path="${_release_notes_base_path}/.FSharp.Core/${FSHARP_CORE_VERSION}.md"
_fsharp_compiler_release_notes_path="${_release_notes_base_path}/.FSharp.Compiler.Service/${FSHARP_CORE_VERSION}.md"
_fsharp_language_release_notes_path="${_release_notes_base_path}/.Language/preview.md"
_fsharp_vs_release_notes_path="${_release_notes_base_path}/.VisualStudio/${VISUAL_STUDIO_VERSION}.md"

readonly paths=(
"src/FSharp.Core|${_fsharp_core_release_notes_path}"
Expand Down
3 changes: 3 additions & 0 deletions docs/content/fsdocs-theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:root {
--main-menu-width: 300px;
}
Binary file added docs/img/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions docs/release-notes/.FSharp.Compiler.Service/8.0.100.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed

* Include the `get,set` keywords in the range of `SynMemberDefn.AutoProperty`. ([PR #15835](https://github.com/dotnet/fsharp/pull/15835))
4 changes: 4 additions & 0 deletions docs/release-notes/.FSharp.Compiler.Service/8.0.200.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

* 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))
* 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))
3 changes: 3 additions & 0 deletions docs/release-notes/.FSharp.Core/8.0.200.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Added

* More inlines for Result module. ([PR #16106](https://github.com/dotnet/fsharp/pull/16106))
3 changes: 3 additions & 0 deletions docs/release-notes/.Language/8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Added

* `while!` ([Language suggestion #1038](https://github.com/fsharp/fslang-suggestions/issues/1038), [PR #14238](https://github.com/dotnet/fsharp/pull/14238))
4 changes: 4 additions & 0 deletions docs/release-notes/.Language/preview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Added

* 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))
* Bidirectional F#/C# interop for 'unmanaged' constraint. ([PR #12154](https://github.com/dotnet/fsharp/pull/12154))
49 changes: 49 additions & 0 deletions docs/release-notes/.aux/Common.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#r "nuget: Markdig, 0.33.0"
#r "nuget: FsHttp, 12.1.0"

open System.IO
open System.Xml.Linq
open System.Text.RegularExpressions
open FsHttp

let versionProps = Path.Combine(__SOURCE_DIRECTORY__, "../../../eng/Versions.props")
let versionPropsDoc = XDocument.Load(versionProps)

/// Find all published versions of a package on NuGet
let getAvailableNuGetVersions (packageName: string) : Set<string> =
let packageName = packageName.ToLowerInvariant()

http { GET $"https://api.nuget.org/v3-flatcontainer/%s{packageName}/index.json" }
|> Request.send
|> Response.deserializeJson<{| versions: string array |}>
|> fun json -> Set.ofArray json.versions

/// Try and find the publish date on NuGet
let tryGetReleaseDate (packageName: string) (version: string) : string option =
let packageName = packageName.ToLowerInvariant()

http { GET $"https://api.nuget.org/v3/registration5-gz-semver2/%s{packageName}/%s{version}.json" }
|> Request.send
|> Response.deserializeJson<{| published: string |}>
|> fun json ->
if System.String.IsNullOrWhiteSpace json.published then
None
else
Some(json.published.Split('T').[0])

/// In order for the heading to appear in the page content menu in fsdocs,
/// they need to follow a specific HTML structure.
let transformH3 (version: string) (input: string) : string =
let pattern = "<h3>(.*?)</h3>"

let replacement =
$"<h3><a name=\"%s{version}-$1\" class=\"anchor\" href=\"#%s{version}-$1\">$1</a></h3>"

Regex.Replace(input, pattern, replacement)

/// Process all MarkDown files from the given release folder
let processFolder (path: string) (processFile: string -> string) : string =
Directory.EnumerateFiles(path, "*.md")
|> Seq.sortByDescending Path.GetFileNameWithoutExtension
|> Seq.map processFile
|> String.concat "\n"
62 changes: 62 additions & 0 deletions docs/release-notes/About.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
category: Release Notes
categoryindex: 600
index: 1
title: About
---

# About

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.
The target audience of these release notes are the respective end-users.

## Writing a changelog entry

In order to keep the change logs consistent the following format was proposed for each entry:

```md
* <Informative description>. ([PR #16106](https://github.com/dotnet/fsharp/pull/16106))
```

Some tips:

* Use valid [Markdown](https://www.markdownguide.org/).
* Use `*` as bullet point symbol. We don't want to mix `*` and `-`.
* Start your description with a capital and end the sentence with a dot.
* **Always** include a link to your pull request before the closing `)`, `([PR #16106](https://github.com/dotnet/fsharp/pull/16106))`.
* If possible, include a link to an issue on `dotnet/fsharp` use `Issue #number` before the link to the pull request.
nojaf marked this conversation as resolved.
Show resolved Hide resolved

Example:

```md
* 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))
```

* If possible, include a link to a language suggestion from `dotnet/fsharp` use `Language suggestion #number` before the link to the pull request.

Example:

```md
* `while!` ([Language suggestion #1038](https://github.com/fsharp/fslang-suggestions/issues/1038), [PR #14238](https://github.com/dotnet/fsharp/pull/14238))
```

* Choose the right section for your type of change. (`## Added`, `## Changed`, `## Deprecated`, `## Removed`, `## Fixed` or `## Security`).
nojaf marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

We probably don't want a separate "Security" area, they fit under "Fixes". Also since we categorizing changes, it would be great to somehow mark breaking changes (or rather ask people to mark them (Breaking prefix?)

Copy link
Member

Choose a reason for hiding this comment

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

Breaking is a good idea, although AFAIU we don't really have a definition for breaking changes yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I'm on the fence with the breaking prefix. Could you give me an example of something that changed, wasn't a fix and isn't breaking? I don't think that combo happens often. If it is listed under change, you can typically assume the change is breaking.

Copy link
Member

@vzarytovskii vzarytovskii Dec 11, 2023

Choose a reason for hiding this comment

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

Breaking is a good idea, although AFAIU we don't really have a definition for breaking changes yet.

We do (always had really):

  • Any binary change in API is a breaking change.
  • Any new Obsoleted API is a breaking change.
  • Any new warning on by default is a breaking change.
  • Almost any new change in whitespace parsing is a breaking change.
  • Any change in runtime behaviour is a breaking change (if it's not an implementation detail).

In other words, for libraries - if it doesn't compile anymore with no code changes, it's a breaking change. For compiler - if it's producing any new warnings - it's a breaking change. For FSharp.Core - if it produces different values in runtime than before - it's a breaking change.

Copy link
Member

Choose a reason for hiding this comment

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

Nice summary. Worth putting somewhere maybe.

* 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.
* 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.
* Related pull requests can be listed in the same entry when it makes sense.

Example:

```md
* 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))
```

## The release process

### General

How does it work? Different stages/phases?

#### FSharp.Compiler.Service

Perhaps add some specific info if available?
47 changes: 47 additions & 0 deletions docs/release-notes/FSharp.Compiler.Service.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
(** ---
category: Release Notes
categoryindex: 600
index: 4
title: FSharp.Compiler.Service
---

# FSharp.Compiler.Service
*)
(*** hide ***)
#load "./.aux/Common.fsx"

open System.IO
open System.Xml.XPath
open Markdig
open Common

let path = Path.Combine(__SOURCE_DIRECTORY__, ".FSharp.Compiler.Service")
let fcsMajorVersion = versionPropsDoc.XPathSelectElement("//FCSMajorVersion").Value
let nugetPackage = "FSharp.Compiler.Service"
let availableNuGetVersions = getAvailableNuGetVersions nugetPackage

processFolder path (fun file ->
let versionInFileName = Path.GetFileNameWithoutExtension(file)
// Example: 8.0.200
let versionParts = versionInFileName.Split '.'

let version = $"%s{fcsMajorVersion}.%s{versionParts.[0]}.%s{versionParts.[2]}"
// TODO: Can we determine if the current version is in code freeze based on the Version.props info?
let title =
if not (availableNuGetVersions.Contains version) then
$"%s{version} - Unreleased"
else
match tryGetReleaseDate nugetPackage version with
| None -> $"%s{version} - Unreleased"
| Some d -> $"%s{version} - %s{d}"

let nugetBadge =
if not (availableNuGetVersions.Contains version) then
System.String.Empty
else
$"<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>"

let content = File.ReadAllText file |> Markdown.ToHtml |> transformH3 version

$"""<h2><a name="%s{version}" class="anchor" href="#%s{version}">%s{title}</a></h2>%s{nugetBadge}%s{content}""")
(*** include-it-raw ***)
4 changes: 0 additions & 4 deletions docs/release-notes/FSharp.Compiler.Service/8.0.200.md

This file was deleted.

42 changes: 42 additions & 0 deletions docs/release-notes/FSharp.Core.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
(** ---
category: Release Notes
categoryindex: 600
index: 3
title: FSharp.Core
---

# FSharp.Core
*)
(*** hide ***)
#load "./.aux/Common.fsx"

open System.IO
open Markdig
open Common

let path = Path.Combine(__SOURCE_DIRECTORY__, ".FSharp.Compiler.Service")
let nugetPackage = "FSharp.Core"
let availableNuGetVersions = getAvailableNuGetVersions nugetPackage

processFolder path (fun file ->
let version = Path.GetFileNameWithoutExtension(file)

// TODO: Can we determine if the current version is in code freeze based on the Version.props info?
let title =
if not (availableNuGetVersions.Contains version) then
$"%s{version} - Unreleased"
else
match tryGetReleaseDate nugetPackage version with
| None -> $"%s{version} - Unreleased"
| Some d -> $"%s{version} - %s{d}"

let nugetBadge =
if not (availableNuGetVersions.Contains version) then
System.String.Empty
else
$"<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>"

let content = File.ReadAllText file |> Markdown.ToHtml |> transformH3 version

$"""<h2><a name="%s{version}" class="anchor" href="#%s{version}">%s{title}</a></h2>%s{nugetBadge}%s{content}""")
(*** include-it-raw ***)
1 change: 0 additions & 1 deletion docs/release-notes/FSharp.Core/8.0.200.md

This file was deleted.

35 changes: 35 additions & 0 deletions docs/release-notes/Language.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
(** ---
category: Release Notes
categoryindex: 600
index: 2
title: F# Language
---

# F\# Language
*)
(*** hide ***)
#load "./.aux/Common.fsx"

open System.IO
open Markdig
open Common

let path = Path.Combine(__SOURCE_DIRECTORY__, ".Language")

Directory.EnumerateFiles(path, "*.md")
|> Seq.sortWith (fun a b ->
let a = Path.GetFileNameWithoutExtension a
let b = Path.GetFileNameWithoutExtension b

match a, b with
| "preview", "preview" -> 0
| "preview", _ -> -1
| _, "preview" -> 1
| _, _ -> compare (int b) (int a))
|> Seq.map (fun file ->
let version = Path.GetFileNameWithoutExtension(file)
let version = if version = "preview" then "Preview" else version
let content = File.ReadAllText file |> Markdown.ToHtml |> transformH3 version
$"""<h2><a name="%s{version}" class="anchor" href="#%s{version}">%s{version}</a></h2>%s{content}""")
|> String.concat "\n"
(*** include-it-raw ***)
1 change: 0 additions & 1 deletion docs/release-notes/Language/preview.md

This file was deleted.