Skip to content

Commit

Permalink
allow warnings to build (not counted as error ...)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Nov 5, 2024
1 parent 0c675ba commit fc6c67e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/release-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,8 @@ jobs:

- name: Build CLI
shell: bash
# TODO: too slow
# env:
# CARGO_PROFILE_RELEASE_LTO: "true"
# CARGO_PROFILE_RELEASE_OPT_LEVEL: "z"
# CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "1"
env:
RUSTFLAGS: "-A warnings"
run: |
if [[ "${{ matrix.platform }}" == "macos-latest" ]]; then
export PKG_CONFIG_PATH="/usr/local/opt/ffmpeg/lib/pkgconfig:$PKG_CONFIG_PATH"
Expand Down Expand Up @@ -258,6 +255,7 @@ jobs:
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: ${{ matrix.args == '--target x86_64-pc-windows-msvc' && '16' || matrix.platform == 'ubuntu-22.04' && '1' || '16' }}
# Enable incremental compilation for Windows
CARGO_INCREMENTAL: ${{ matrix.args == '--target x86_64-pc-windows-msvc' && '1' || '0' }}
RUSTFLAGS: "-A warnings"
with:
args: ${{ matrix.tauri-args }}
projectPath: "./screenpipe-app-tauri"
Expand Down
32 changes: 17 additions & 15 deletions screenpipe-server/src/bin/screenpipe-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use screenpipe_server::{
cli::{Cli, CliAudioTranscriptionEngine, CliOcrEngine, Command, PipeCommand}, start_continuous_recording, watch_pid, DatabaseManager, PipeControl, PipeManager, ResourceMonitor, Server, highlight::{Highlight,HighlightConfig}
};
use screenpipe_vision::monitor::list_monitors;
use screenpipe_vision::run_ui;
use serde_json::{json, Value};
use tokio::{runtime::Runtime, signal, sync::broadcast};
use tracing_subscriber::prelude::__tracing_subscriber_SubscriberExt;
Expand Down Expand Up @@ -720,21 +719,24 @@ async fn main() -> anyhow::Result<()> {
}

// Start the UI monitoring task
#[cfg(target_os = "macos")]
if cli.enable_ui_monitoring {
let shutdown_tx_clone = shutdown_tx.clone();
tokio::spawn(async move {
let mut shutdown_rx = shutdown_tx_clone.subscribe();

tokio::select! {
_ = run_ui() => {
error!("ui monitoring stopped unexpectedly");
}
_ = shutdown_rx.recv() => {
info!("received shutdown signal, stopping ui monitoring");
if cfg!(target_os = "macos") {
use screenpipe_vision::run_ui;

if cli.enable_ui_monitoring {
let shutdown_tx_clone = shutdown_tx.clone();
tokio::spawn(async move {
let mut shutdown_rx = shutdown_tx_clone.subscribe();

tokio::select! {
_ = run_ui() => {
error!("ui monitoring stopped unexpectedly");
}
_ = shutdown_rx.recv() => {
info!("received shutdown signal, stopping ui monitoring");
}
}
}
});
});
}
}

let pipe_control_future = async {
Expand Down

0 comments on commit fc6c67e

Please sign in to comment.