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

Update DEVGUIDE.md #16197

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Update DEVGUIDE.md #16197

merged 1 commit into from
Aug 12, 2024

Conversation

smoothdeveloper
Copy link
Contributor

Add a section about updating FCS surface area baselines specifically.

Credit to @auduchinok

@smoothdeveloper smoothdeveloper requested a review from a team as a code owner October 28, 2023 11:58
### Updating FCS surface area baselines

```bash
$env:TEST_UPDATE_BSL=1
Copy link
Member

Choose a reason for hiding this comment

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

This is not needed for surface area, only test baselines (unless something changed lately, and if it does, it needs to be reverted to not require that flag).

Copy link
Contributor

Choose a reason for hiding this comment

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

You sure?

type SurfaceAreaTest() =
// This relies on a set of baselines to update the baseline set an environment variable before running the tests, then on failure the baselines will be updated
// Handled by SurfaceArea.verify
//
// CMD:
// set TEST_UPDATE_BSL=1
// PowerShell:
// $env:TEST_UPDATE_BSL=1
// Linux/macOS:
// export TEST_UPDATE_BSL=1

Copy link
Member

Choose a reason for hiding this comment

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

It used to not rely. That was the whole point of it, so when you run tests, you update it and it was part of PR and reflected there.

Copy link
Member

Choose a reason for hiding this comment

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

It was always updating it, I am not sure why would we make it not to:

4c60c63


```bash
$env:TEST_UPDATE_BSL=1
dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --filter "SurfaceAreaTest" /p:BUILDING_USING_DOTNET=true
Copy link
Member

Choose a reason for hiding this comment

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

This won't work if building with build scripts. The dotnet building flag is not officially supported with arcade builds, and will yield cryptic errors.

This should instead explain how to update surface area with build scripts and separately with dotnet test, same as it is done with builds.

Comment on lines +206 to +207
dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --filter "SurfaceAreaTest" -c Release /p:BUILDING_USING_DOTNET=true
dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --filter "SurfaceAreaTest" -c Release /p:BUILDING_USING_DOTNET=true
Copy link
Member

Choose a reason for hiding this comment

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

Why is it here twice?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

First pass, the test will fail (and update the baseline), second pass, it is green.

Copy link
Member

Choose a reason for hiding this comment

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

But second isn't necessarily needed probably, should mention that and say that second one is optional.

DEVGUIDE.md Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants