Skip to content

Conversation

@rolfbjarne
Copy link
Member

@rolfbjarne rolfbjarne commented Dec 15, 2022

A long time ago, Apple created WebKit bindings for macOS, and we bound those in the webkit.cs and WebKit/*.cs files. These were later deprecated in macOS 10.14.

A bit later (iOS 8.0 / macOS 10.10) Apple created new (and severely limited) WebKit API for both iOS and macOS, and since these were quite different/new, we bound them in wkwebkit.cs and WKWebKit/*.cs files.

However, the actual namespace for both is WebKit, which leaves us with a few special-cases in our code to handle the fact that we've bound the same namespace in different files/directories.

Unifying these implementations in webkit.cs and WebKit/*.cs, makes it possible to avoid these special cases.

I've also explicitly added No* availability attributes to the old and deprecated macOS bindings for all other platforms than macOS, in order to avoid more special-casing when it comes to availability attributes (and that logic is already complicated enough as it is).

This prevents the generator from thinking that all these APIs are available on
other platforms (because WebKit is available on iOS as well, but bound in
wkwebkit.cs), and will thus create the correct availability attributes on
macOS for other platforms.
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Artifacts were not provided.

Pipeline on Agent XAMBOT-1109.Monterey'
Hash: b0fc8f626139791dae7d4ad1146437925f881b83 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
  • iOS (no change detected)
  • tvOS (no change detected)
  • watchOS (no change detected)
  • macOS (no change detected)
NET (empty diffs)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: (empty diff detected)

✅ API diff vs stable

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)
Legacy Xamarin (stable) vs .NET

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: b0fc8f626139791dae7d4ad1146437925f881b83 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻

All tests on macOS M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
Hash: b0fc8f626139791dae7d4ad1146437925f881b83 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne marked this pull request as ready for review December 15, 2022 16:05
@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build] Test results 🚀

Test results

✅ All tests passed on VSTS: simulator tests.

🎉 All 223 tests passed 🎉

Tests counts

✅ bcl: All 69 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 7 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ introspection: All 8 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 23 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: b0fc8f626139791dae7d4ad1146437925f881b83 [PR build]

@rolfbjarne rolfbjarne changed the title [DRAFT] [WebKit] Merge WKWebKit into WebKit. [WebKit] Merge WKWebKit into WebKit. Dec 16, 2022
@rolfbjarne rolfbjarne merged commit 968f9d1 into dotnet:main Dec 19, 2022
@rolfbjarne rolfbjarne deleted the webkit-unification branch December 19, 2022 17:37
rolfbjarne added a commit to rolfbjarne/macios that referenced this pull request Mar 30, 2023
A long time ago, Apple created WebKit bindings for macOS, and we bound those in the webkit.cs and WebKit/*.cs files. These were later deprecated in macOS 10.14.

A bit later (iOS 8.0 / macOS 10.10) Apple created new (and severely limited) WebKit API for both iOS and macOS, and since these were quite different/new, we bound them in wkwebkit.cs and WKWebKit/*.cs files.

However, the actual namespace for both is WebKit, which leaves us with a few special-cases in our code to handle the fact that we've bound the same namespace in different files/directories.

Unifying these implementations in webkit.cs and WebKit/*.cs, makes it possible to avoid these special cases.

I've also explicitly added No* availability attributes to the old and deprecated macOS bindings for all other platforms than macOS, in order to avoid more special-casing when it comes to availability attributes (and that logic is already complicated enough as it is).
dalexsoto added a commit that referenced this pull request Mar 30, 2023
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