-
Notifications
You must be signed in to change notification settings - Fork 0
Less statics #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: coderabbit_combined_20260121_augment_sentry_coderabbit_1_base_less_statics_pr142
Are you sure you want to change the base?
Less statics #18
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@tauri-apps/cli": patch:changes | ||
| "tauri-cli": patch:changes | ||
| --- | ||
|
|
||
| Refactored internal use of static on config and directory resolvings, no user facing changes, please report any regressions if you encounter any | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ use crate::{ | |
| acl, | ||
| error::ErrorExt, | ||
| helpers::{ | ||
| app_paths::{resolve_frontend_dir, tauri_dir}, | ||
| app_paths::{resolve_frontend_dir, Dirs}, | ||
| cargo, | ||
| npm::PackageManager, | ||
| }, | ||
|
|
@@ -39,11 +39,11 @@ pub struct Options { | |
| } | ||
|
|
||
| pub fn command(options: Options) -> Result<()> { | ||
| crate::helpers::app_paths::resolve(); | ||
| run(options) | ||
| let dirs = crate::helpers::app_paths::resolve_dirs(); | ||
| run(options, &dirs) | ||
| } | ||
|
|
||
| pub fn run(options: Options) -> Result<()> { | ||
| pub fn run(options: Options, dirs: &Dirs) -> Result<()> { | ||
| let (plugin, version) = options | ||
| .plugin | ||
| .split_once('@') | ||
|
|
@@ -71,7 +71,6 @@ pub fn run(options: Options) -> Result<()> { | |
| } | ||
|
|
||
| let frontend_dir = resolve_frontend_dir(); | ||
| let tauri_dir = tauri_dir(); | ||
|
|
||
| let target_str = metadata | ||
| .desktop_only | ||
|
|
@@ -90,7 +89,7 @@ pub fn run(options: Options) -> Result<()> { | |
| branch: options.branch.as_deref(), | ||
| rev: options.rev.as_deref(), | ||
| tag: options.tag.as_deref(), | ||
| cwd: Some(tauri_dir), | ||
| cwd: Some(dirs.tauri), | ||
| target: target_str, | ||
| })?; | ||
|
|
||
|
|
@@ -117,7 +116,7 @@ pub fn run(options: Options) -> Result<()> { | |
| (None, None, None, None) => npm_name, | ||
| _ => crate::error::bail!("Only one of --tag, --rev and --branch can be specified"), | ||
| }; | ||
| manager.install(&[npm_spec], tauri_dir)?; | ||
| manager.install(&[npm_spec], dirs.tauri)?; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's examine the add.rs file around lines 97 and 119
head -130 crates/tauri-cli/src/add.rs | tail -40Repository: qodo-benchmark/tauri-combined-coderabbit Length of output: 224 🏁 Script executed: # Check PackageManager::install implementation
rg -n -B5 -A15 'pub fn install\(' crates/tauri-cli/src/helpers/npm.rsRepository: qodo-benchmark/tauri-combined-coderabbit Length of output: 66 🏁 Script executed: # Check how PackageManager is initialized and if cwd is set during creation
rg -n -B3 -A10 'PackageManager::new\|fn new\(' crates/tauri-cli/src/helpers/npm.rs | head -50Repository: qodo-benchmark/tauri-combined-coderabbit Length of output: 66 🏁 Script executed: # Look at remove.rs to compare the pattern
rg -n -B5 -A5 'manager\.install\|PackageManager' crates/tauri-cli/src/remove.rs | head -60Repository: qodo-benchmark/tauri-combined-coderabbit Length of output: 66 🏁 Script executed: cat -n crates/tauri-cli/src/add.rs | sed -n '85,130p'Repository: qodo-benchmark/tauri-combined-coderabbit Length of output: 2024 🏁 Script executed: cat -n crates/tauri-cli/src/helpers/npm.rs | sed -n '1,200p'Repository: qodo-benchmark/tauri-combined-coderabbit Length of output: 6885 🏁 Script executed: cat -n crates/tauri-cli/src/remove.rs | sed -n '85,135p'Repository: qodo-benchmark/tauri-combined-coderabbit Length of output: 66 Fix NPM install directory mismatch. The Pass the frontend directory to 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| let _ = acl::permission::add::command(acl::permission::add::Options { | ||
|
|
@@ -143,7 +142,10 @@ pub fn run(options: Options) -> Result<()> { | |
| let plugin_init = format!(".plugin(tauri_plugin_{plugin_snake_case}::{plugin_init_fn})"); | ||
|
|
||
| let re = Regex::new(r"(tauri\s*::\s*Builder\s*::\s*default\(\))(\s*)").unwrap(); | ||
| for file in [tauri_dir.join("src/main.rs"), tauri_dir.join("src/lib.rs")] { | ||
| for file in [ | ||
| dirs.tauri.join("src/main.rs"), | ||
| dirs.tauri.join("src/lib.rs"), | ||
| ] { | ||
| let contents = | ||
| std::fs::read_to_string(&file).fs_context("failed to read Rust entry point", file.clone())?; | ||
|
|
||
|
|
@@ -166,7 +168,7 @@ pub fn run(options: Options) -> Result<()> { | |
| log::info!("Running `cargo fmt`..."); | ||
| let _ = Command::new("cargo") | ||
| .arg("fmt") | ||
| .current_dir(tauri_dir) | ||
| .current_dir(dirs.tauri) | ||
| .status(); | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor grammar fix: hyphenate "user-facing".
When used as a compound adjective before a noun, "user-facing" should be hyphenated.
📝 Suggested fix
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[grammar] ~6-~6: Use a hyphen to join words.
Context: ...config and directory resolvings, no user facing changes, please report any regres...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents