Skip to content

Enabled Baseline Package Validation - #3169

Merged
mxschmitt merged 9 commits into
microsoft:mainfrom
304NotModified:PackageBaselineValidation
Jun 3, 2025
Merged

Enabled Baseline Package Validation#3169
mxschmitt merged 9 commits into
microsoft:mainfrom
304NotModified:PackageBaselineValidation

Conversation

@304NotModified

@304NotModified 304NotModified commented May 23, 2025

Copy link
Copy Markdown
Contributor

see #3161 (comment)

@304NotModified
304NotModified marked this pull request as draft May 23, 2025 14:15
@304NotModified
304NotModified marked this pull request as ready for review May 23, 2025 14:26

@mxschmitt mxschmitt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks great but I'm asking myself if its worth using a very old version as a baseline. I'd instead use a more recent one and then continue the journey from there?

@304NotModified

Copy link
Copy Markdown
Contributor Author

As we do semver, we would like to know the breaking changes when someone upgrades from a old version?

Some breaking changes are acceptable, and those are in the suppression file :)

@304NotModified

Copy link
Copy Markdown
Contributor Author

It seems we have already new breaking changes and not sure if they are intentional 😅

@304NotModified

304NotModified commented May 30, 2025

Copy link
Copy Markdown
Contributor Author

@mxschmitt
So this is the new breaking change in master (introduced by d0f2745)

First we had a public empty ctor for BindingSource.cs, now that ctor is gone!

image

Is that intentional?

Anyway, shown by the baseline package validation :)

I've added it to the suppressions by dotnet pack /p:ApiCompatGenerateSuppressionFile=true

@mxschmitt

Copy link
Copy Markdown
Contributor

First we had a public empty ctor for BindingSource.cs, now that ctor is gone!

Yes, because BindingSource is a class we construct and not the user.

I think lets consider everything before the latest release as "it was intentional" instead of committing a bunch of irrelevant exceptions to the repository. Do you mind adjusting it? then we can merge.

@304NotModified

Copy link
Copy Markdown
Contributor Author

So the baseline version should 1.52.0, correct?

@mxschmitt

Copy link
Copy Markdown
Contributor

So the baseline version should 1.52.0, correct?

Yes

@304NotModified

Copy link
Copy Markdown
Contributor Author

OK working on it :)

@304NotModified

304NotModified commented Jun 3, 2025

Copy link
Copy Markdown
Contributor Author

@mxschmitt

Updated, but there is also a new (small) breaking change?

From #3184 - the Ref property is removed from LocatorAriaSnapshotOptions.cs

image

But it's documented a new in 1.52, so it just introduced.

https://playwright.dev/dotnet/docs/api/class-locator#locator-aria-snapshot

image

Anyway, if this in indented, then this PR is ready

@mxschmitt mxschmitt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome! Yeah the Ref property was intentionally removed.

@304NotModified 304NotModified changed the title Package baseline validation Enabled Baseline Package Validation Jun 3, 2025
@304NotModified

Copy link
Copy Markdown
Contributor Author

All green. Feel free to rename the PR before merge :)

@kblok

kblok commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

@304NotModified @mxschmitt are we semver? I think playwright broke compatibility many times.

@mxschmitt
mxschmitt merged commit 8413bdc into microsoft:main Jun 3, 2025
@304NotModified
304NotModified deleted the PackageBaselineValidation branch June 3, 2025 22:20
@304NotModified

304NotModified commented Jun 3, 2025

Copy link
Copy Markdown
Contributor Author

@kblok

I hope this PR will help in getting the API more stable in terms of breaking changes.
Sometime there are good reasons to break compatibility, this is now more transparent and explicit.

My report of the binary breaking change (#3161) was quickly fixed, so thanks for that! I hope we have less need for these fixes in the future :)

@kblok

kblok commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

@304NotModified The problem is that upstream playwright determines the API, andplaywright-dotnet matches the upstream version. If upstream breaks the compatibility without changing the major version, there is nothing we can do here.

@304NotModified

304NotModified commented Jun 4, 2025

Copy link
Copy Markdown
Contributor Author

@304NotModified The problem is that upstream playwright determines the API, andplaywright-dotnet matches the upstream version. If upstream breaks the compatibility without changing the major version, there is nothing we can do here.

@kblok
I don't think that's always true. E.g. instead of removing the Ref property (see #3169 (comment)) we could mark it with a [Obsolete] attribuut. Now it's a binary and source breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants