diff --git a/.changes/rust-194.md b/.changes/rust-194.md new file mode 100644 index 000000000..64a423037 --- /dev/null +++ b/.changes/rust-194.md @@ -0,0 +1,5 @@ +--- +wry: patch +--- + +Fixed a compile error about missing Ext traits when building wry 0.24 / tauri v1 apps with Rust 1.94. diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index c105d2ed6..e31f58c25 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -11,9 +11,9 @@ on: jobs: audit-rust: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: rust audit uses: actions-rs/audit-check@v1 with: diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index ae6bedc47..ec50a66c2 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -8,7 +8,7 @@ on: env: RUST_BACKTRACE: 1 - CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency. + CARGO_PROFILE_DEV_DEBUG: 0 LC_ALL: en_US.UTF-8 # This prevents strace from changing it's number format to use commas. concurrency: @@ -22,12 +22,12 @@ jobs: matrix: rust: [nightly] platform: - - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-22.04 } runs-on: ${{ matrix.platform.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: install ${{ matrix.rust }} uses: actions-rs/toolchain@v1 with: @@ -51,12 +51,6 @@ jobs: sudo dpkg -i hyperfine_1.11.0_amd64.deb pip install memory_profiler - - uses: Swatinem/rust-cache@v2 - with: - workspaces: | - . - bench/tests - - name: run benchmarks run: | cargo +nightly build --release -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target ${{ matrix.platform.target }} --manifest-path bench/tests/Cargo.toml @@ -64,7 +58,7 @@ jobs: - name: clone benchmarks_results if: github.repository == 'tauri-apps/wry' && github.ref == 'refs/heads/dev' - uses: actions/checkout@v2 + uses: actions/checkout@v6 with: token: ${{ secrets.BENCH_PAT }} path: gh-pages diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 715ea8389..1baed01e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,15 +10,15 @@ jobs: rust_version: [stable] platform: - { target: x86_64-pc-windows-msvc, os: windows-latest } - - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-22.04 } - { target: x86_64-apple-darwin, os: macos-latest } - { target: aarch64-apple-ios, os: macos-latest } - - { target: aarch64-linux-android, os: ubuntu-latest } + - { target: aarch64-linux-android, os: ubuntu-22.04 } runs-on: ${{ matrix.platform.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: install stable uses: actions-rs/toolchain@v1 with: @@ -41,39 +41,6 @@ jobs: - name: Get current date run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Cache cargo registry - uses: actions/cache@v2.1.4 - with: - path: ~/.cargo/registry - # Add date to the cache to keep it up to date - key: ${{ matrix.platform }}-stable-cargo-registry-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }} - # Restore from outdated cache for speed - restore-keys: | - ${{ matrix.platform }}-stable-cargo-registry-${{ hashFiles('Cargo.toml') }} - ${{ matrix.platform }}-stable-cargo-registry- - - - name: Cache cargo index - uses: actions/cache@v2.1.4 - with: - path: ~/.cargo/git - # Add date to the cache to keep it up to date - key: ${{ matrix.platform }}-stable-cargo-index-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }} - # Restore from outdated cache for speed - restore-keys: | - ${{ matrix.platform }}-stable-cargo-index-${{ hashFiles('Cargo.toml') }} - ${{ matrix.platform }}-stable-cargo-index- - - - name: Cache cargo target - uses: actions/cache@v2 - with: - path: target - # Add date to the cache to keep it up to date - key: ${{ matrix.platform }}-stable-cargo-core-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }} - # Restore from outdated cache for speed - restore-keys: | - ${{ matrix.platform }}-stable-cargo-core-${{ hashFiles('Cargo.toml') }} - ${{ matrix.platform }}-stable-cargo-core- - - name: build wry run: cargo build --features tray --target ${{ matrix.platform.target }} diff --git a/.github/workflows/covector-status.yml b/.github/workflows/covector-status.yml index c55967a55..154a0c2ba 100644 --- a/.github/workflows/covector-status.yml +++ b/.github/workflows/covector-status.yml @@ -3,10 +3,10 @@ on: [pull_request] jobs: covector: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 with: fetch-depth: 0 - name: covector status diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index 3ba97bab0..741e3e97e 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -8,7 +8,7 @@ on: jobs: version-or-publish: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 65 outputs: change: ${{ steps.covector.outputs.change }} @@ -16,7 +16,7 @@ jobs: successfulPublish: ${{ steps.covector.outputs.successfulPublish }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 with: fetch-depth: 0 - name: cargo login diff --git a/.github/workflows/fmt.yml b/.github/workflows/fmt.yml index 71857361a..4a8a414d5 100644 --- a/.github/workflows/fmt.yml +++ b/.github/workflows/fmt.yml @@ -11,7 +11,7 @@ jobs: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: actions-rs/toolchain@v1 with: profile: minimal diff --git a/src/webview/webkitgtk/mod.rs b/src/webview/webkitgtk/mod.rs index 6f8f3d028..bf0f5c8f4 100644 --- a/src/webview/webkitgtk/mod.rs +++ b/src/webview/webkitgtk/mod.rs @@ -16,9 +16,9 @@ use std::{ }; use url::Url; use webkit2gtk::{ - traits::*, LoadEvent, NavigationPolicyDecision, PolicyDecisionType, URIRequest, - UserContentInjectedFrames, UserContentManager, UserScript, UserScriptInjectionTime, WebView, - WebViewBuilder, + LoadEvent, NavigationPolicyDecision, NavigationPolicyDecisionExt, PolicyDecisionType, + SettingsExt, URIRequest, URIRequestExt, UserContentInjectedFrames, UserContentManager, + UserContentManagerExt, UserScript, UserScriptInjectionTime, WebView, WebViewBuilder, WebViewExt, }; use webkit2gtk_sys::{ webkit_get_major_version, webkit_get_micro_version, webkit_get_minor_version, @@ -323,6 +323,8 @@ impl InnerWebView { let is_inspector_open = { let is_inspector_open = Arc::new(AtomicBool::default()); if let Some(inspector) = WebViewExt::inspector(&*webview) { + use webkit2gtk::WebInspectorExt; + let is_inspector_open_ = is_inspector_open.clone(); inspector.connect_bring_to_front(move |_| { is_inspector_open_.store(true, Ordering::Relaxed); @@ -441,6 +443,8 @@ impl InnerWebView { #[cfg(any(debug_assertions, feature = "devtools"))] pub fn open_devtools(&self) { if let Some(inspector) = WebViewExt::inspector(&*self.webview) { + use webkit2gtk::WebInspectorExt; + inspector.show(); // `bring-to-front` is not received in this case self.is_inspector_open.store(true, Ordering::Relaxed); @@ -450,6 +454,8 @@ impl InnerWebView { #[cfg(any(debug_assertions, feature = "devtools"))] pub fn close_devtools(&self) { if let Some(inspector) = WebViewExt::inspector(&*self.webview) { + use webkit2gtk::WebInspectorExt; + inspector.close(); } } diff --git a/src/webview/webkitgtk/web_context.rs b/src/webview/webkitgtk/web_context.rs index c80a9f13d..4e8c823b9 100644 --- a/src/webview/webkitgtk/web_context.rs +++ b/src/webview/webkitgtk/web_context.rs @@ -21,8 +21,8 @@ use std::{ }; use url::Url; use webkit2gtk::{ - traits::*, ApplicationInfo, CookiePersistentStorage, LoadEvent, URIRequest, WebContext, - WebContextBuilder, WebView, WebsiteDataManagerBuilder, + ApplicationInfo, CookiePersistentStorage, LoadEvent, URIRequest, URIRequestExt, WebContext, + WebContextBuilder, WebView, WebViewExt, WebsiteDataManagerBuilder, }; #[derive(Debug)]