Conditional compilation for CDP implementation only#3135
Conditional compilation for CDP implementation only#3135kblok merged 10 commits intohardkoded:masterfrom
Conversation
|
Clever |
|
How about some tool that validates that we never leak wedriver bidi there? |
|
@kblok I used ILSpy to decompile the dll from the generated nuget package earlier, and it had nothing in the PuppeteerSharp.Bidi namespace there at all. If you check the PuppeteerSharp.csproj file, you'll see that I put a condition on referencing the WebDriverBiDi library in the first place. It won't even pull it in if we're doing CDP only. You can also see that it trimmed out the handling of the launching and connecting when using WebdriverBidi in the Launcher class, as I intended with the preprocessor directives: |
Im thinking about the future. What can we do so I don't break you in the future? |
|
@kblok I'm writing a script right now to decompile the generated DLL and check to make sure it doesn't include the PuppeteerSharp.Bidi namespace or the WebDriverBiDi dependency. |
|
@kblok alright, check what I added. It checks if the resulting assembly include WebDriverBiDi and if we have any types related to such usage. |
|
One more thing. |
|
Great job! |
Yep, that's overridden now. |
|
@steveberdy new build failed. |
|
@kblok which run? From what I see, they're still in progress and none have failed. |
We are good. I might have seen an old one. |
|
I will ship this tomorrow |



Creates a
PuppeteerSharp.CdpNuget package that removes the WebDriverBiDi implementation and only leaves the CDP implementation. Useful for native AOT builds that don't want the excess binary size generated by WebDriverBiDi code.Note: the build and Nuget push steps are both duplicated in the pipelines, as Nuget packages are cleared between builds.
Fixes #3134