Skip to content

Commit 6b14eb0

Browse files
authored
Merge branch 'trunk' into repository
2 parents d21f48e + c0b45ad commit 6b14eb0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+5891
-5914
lines changed

.bazelrc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ build --tool_java_runtime_version=remotejdk_17
3030
build --javacopt="--release 11"
3131

3232
# Require java dependencies to be used and first-order
33-
3433
build --experimental_strict_java_deps=strict
3534
build --explicit_java_test_deps
3635

36+
# Avoid ErrorProne getting annoyed about "impossible null checks"
37+
build --javacopt="-Xep:ImpossibleNullComparison:OFF"
38+
3739
# Allow spaces in runfile paths
3840
build --nobuild_runfile_links
3941

@@ -55,6 +57,11 @@ query --@aspect_rules_ts//ts:default_to_tsc_transpiler
5557

5658
build --incompatible_strict_action_env
5759

60+
# Required to get `protobuf` compiling, which is required for `rules_closure`
61+
build --incompatible_enable_cc_toolchain_resolution
62+
build --cxxopt=-std=c++14
63+
build --host_cxxopt=-std=c++14
64+
5865
# For build stamping
5966

6067
build --enable_platform_specific_config

.github/workflows/bazel.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ jobs:
8282
steps:
8383
- name: Checkout source tree
8484
uses: actions/checkout@v4
85+
- name: Pull latest changes
86+
if: startsWith(github.head_ref, 'renovate/')
87+
run: git pull origin ${{ github.head_ref }}
8588
- name: Free space
8689
if: inputs.os != 'windows'
8790
run: ./scripts/github-actions/free-disk-space.sh

.github/workflows/ci-rbe.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
format:
1212
name: Format
13-
if: github.repository_owner == 'seleniumhq'
13+
if: github.repository_owner == 'seleniumhq' && startsWith(github.head_ref, 'renovate/') != true
1414
uses: ./.github/workflows/bazel.yml
1515
with:
1616
name: Check format script run
@@ -20,7 +20,7 @@ jobs:
2020

2121
test:
2222
name: Test
23-
if: github.repository_owner == 'seleniumhq'
23+
if: github.repository_owner == 'seleniumhq' && startsWith(github.head_ref, 'renovate/') != true
2424
uses: ./.github/workflows/bazel.yml
2525
with:
2626
name: All RBE tests
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI - Renovate - RBE
2+
3+
on:
4+
push:
5+
branches:
6+
- renovate/*
7+
workflow_dispatch:
8+
9+
jobs:
10+
format:
11+
runs-on: ubuntu-latest
12+
if: github.repository_owner == 'seleniumhq'
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v4
16+
- name: java - repin dependencies
17+
if: contains(join(github.event.commits.*.message), '[java]')
18+
run: REPIN=1 bazel run @maven//:pin
19+
- name: rust - repin dependencies
20+
if: contains(join(github.event.commits.*.message), '[rust]')
21+
run: CARGO_BAZEL_REPIN=true bazel sync --only=crates
22+
- name: js - repin dependencies
23+
if: contains(join(github.event.commits.*.message), '[js]')
24+
run: bazel run -- @pnpm//:pnpm install --dir $PWD --lockfile-only
25+
- name: dotnet - repin dependencies
26+
if: contains(join(github.event.commits.*.message), '[dotnet]')
27+
run: ./dotnet/update-deps.sh
28+
- name: py - repin dependencies
29+
if: contains(join(github.event.commits.*.message), '[py]')
30+
run: bazel run //py:requirements.update
31+
- name: Commit files
32+
run: |
33+
export CHANGES=$(git status -s)
34+
if [ -n "$CHANGES" ]; then
35+
git config --local user.email "[email protected]"
36+
git config --local user.name "Selenium CI Bot"
37+
git add .
38+
git commit -m 'Repin dependencies'
39+
git push
40+
fi
41+
42+
check-format:
43+
needs: format
44+
name: Check format
45+
if: github.repository_owner == 'seleniumhq'
46+
uses: ./.github/workflows/bazel.yml
47+
with:
48+
name: Check format script run
49+
caching: false
50+
ruby-version: jruby-9.4.8.0
51+
run: ./scripts/github-actions/check-format.sh
52+
53+
test:
54+
name: Test
55+
if: github.repository_owner == 'seleniumhq'
56+
uses: ./.github/workflows/bazel.yml
57+
with:
58+
name: All RBE tests
59+
caching: false
60+
ruby-version: jruby-9.4.8.0
61+
run: ./scripts/github-actions/ci-build.sh

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ bazel_dep(name = "contrib_rules_jvm", version = "0.27.0")
1212
bazel_dep(name = "platforms", version = "0.0.10")
1313

1414
# Required for the closure rules
15-
bazel_dep(name = "protobuf", version = "21.7", dev_dependency = True, repo_name = "com_google_protobuf")
15+
bazel_dep(name = "protobuf", version = "29.1", dev_dependency = True, repo_name = "com_google_protobuf")
1616

1717
# Required for rules_rust to import the crates properly
1818
bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True)

WORKSPACE

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
66

77
http_archive(
88
name = "io_bazel_rules_closure",
9-
patch_args = [
10-
"-p1",
11-
],
12-
patches = [
13-
"//javascript:rules_closure_shell.patch",
14-
],
15-
sha256 = "d66deed38a0bb20581c15664f0ab62270af5940786855c7adc3087b27168b529",
16-
strip_prefix = "rules_closure-0.11.0",
17-
urls = [
18-
"https://github.com/bazelbuild/rules_closure/archive/0.11.0.tar.gz",
19-
],
9+
strip_prefix = "rules_closure-0.12.0",
10+
url = "https://github.com/bazelbuild/rules_closure/archive/refs/tags/0.12.0.tar.gz",
2011
)
2112

2213
load("@io_bazel_rules_closure//closure:repositories.bzl", "rules_closure_dependencies", "rules_closure_toolchains")
@@ -34,8 +25,8 @@ rules_closure_toolchains()
3425

3526
http_archive(
3627
name = "rules_rust",
37-
integrity = "sha256-Zx3bP+Xrz53TTQUeynNS+68z+lO/Ye7Qt1pMNIKeVIA=",
38-
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.52.2/rules_rust-v0.52.2.tar.gz"],
28+
integrity = "sha256-eEXiHXSGUH6qD1bdI5KXZ/B04m0wIUeoyM7pmujzbbQ=",
29+
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.55.5/rules_rust-0.55.5.tar.gz"],
3930
)
4031

4132
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")

dotnet/src/webdriver/Alert.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@
2020
using System;
2121
using System.Collections.Generic;
2222

23+
#nullable enable
24+
2325
namespace OpenQA.Selenium
2426
{
2527
/// <summary>
2628
/// Defines the interface through which the user can manipulate JavaScript alerts.
2729
/// </summary>
2830
internal class Alert : IAlert
2931
{
30-
private WebDriver driver;
32+
private readonly WebDriver driver;
3133

3234
/// <summary>
3335
/// Initializes a new instance of the <see cref="Alert"/> class.
@@ -41,12 +43,12 @@ public Alert(WebDriver driver)
4143
/// <summary>
4244
/// Gets the text of the alert.
4345
/// </summary>
44-
public string Text
46+
public string? Text
4547
{
4648
get
4749
{
4850
Response commandResponse = this.driver.InternalExecute(DriverCommand.GetAlertText, null);
49-
return commandResponse.Value.ToString();
51+
return (string?)commandResponse.Value;
5052
}
5153
}
5254

@@ -70,9 +72,10 @@ public void Accept()
7072
/// Sends keys to the alert.
7173
/// </summary>
7274
/// <param name="keysToSend">The keystrokes to send.</param>
75+
/// <exception cref="ArgumentNullException">If <paramref name="keysToSend" /> is <see langword="null"/>.</exception>
7376
public void SendKeys(string keysToSend)
7477
{
75-
if (keysToSend == null)
78+
if (keysToSend is null)
7679
{
7780
throw new ArgumentNullException(nameof(keysToSend), "Keys to send must not be null.");
7881
}

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CaptureScreenshotCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public abstract record ClipRectangle
6262
{
6363
public record Box(double X, double Y, double Width, double Height) : ClipRectangle;
6464

65-
public record Element([property: JsonPropertyName("element")] Script.SharedReference SharedReference) : ClipRectangle;
65+
public record Element([property: JsonPropertyName("element")] Script.ISharedReference SharedReference) : ClipRectangle;
6666
}
6767

6868
public record CaptureScreenshotResult(string Data)

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/LocateNodesCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ internal record LocateNodesCommandParameters(BrowsingContext Context, Locator Lo
3333

3434
public Script.SerializationOptions? SerializationOptions { get; set; }
3535

36-
public IEnumerable<Script.SharedReference>? StartNodes { get; set; }
36+
public IEnumerable<Script.ISharedReference>? StartNodes { get; set; }
3737
}
3838

3939
public record LocateNodesOptions : CommandOptions
@@ -42,7 +42,7 @@ public record LocateNodesOptions : CommandOptions
4242

4343
public Script.SerializationOptions? SerializationOptions { get; set; }
4444

45-
public IEnumerable<Script.SharedReference>? StartNodes { get; set; }
45+
public IEnumerable<Script.ISharedReference>? StartNodes { get; set; }
4646
}
4747

4848
public record LocateNodesResult : IReadOnlyList<Script.RemoteValue.Node>

dotnet/src/webdriver/BiDi/Modules/Input/Origin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public record Viewport() : Origin;
2929

3030
public record Pointer() : Origin;
3131

32-
public record Element([property: JsonPropertyName("element")] Script.SharedReference SharedReference) : Origin
32+
public record Element([property: JsonPropertyName("element")] Script.ISharedReference SharedReference) : Origin
3333
{
3434
public string Type { get; } = "element";
3535
}

0 commit comments

Comments
 (0)