Skip to content

Commit a07dd4c

Browse files
committed
[FIX] server: OYarn - String compile issues
1 parent f11c0e4 commit a07dd4c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

server/src/core/python_arch_eval_hooks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ static arch_eval_file_hooks: Lazy<Vec<PythonArchEvalFileHook>> = Lazy::new(|| {v
304304
if let Some(boolean) = boolean_field.first() {
305305
let mut eval = Evaluation::eval_from_symbol(&Rc::downgrade(&boolean), Some(true));
306306
let weak = eval.symbol.get_mut_symbol_ptr().as_mut_weak();
307-
weak.context.insert(Sy!("compute"), ContextValue::STRING(S!("_compute_global")));
307+
weak.context.insert(S!("compute"), ContextValue::STRING(S!("_compute_global")));
308308
symbol.borrow_mut().set_evaluations(vec![eval]);
309309
}
310310
}},

server/src/core/symbols/variable_symbol.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use ruff_text_size::TextRange;
22

3-
use crate::{constants::{OYarn, SymType}, core::evaluation::{ContextValue, Evaluation}, oyarn, threads::SessionInfo, Sy};
3+
use crate::{constants::{OYarn, SymType}, core::evaluation::{ContextValue, Evaluation}, oyarn, threads::SessionInfo, Sy, S};
44
use std::{cell::RefCell, collections::HashMap, rc::{Rc, Weak}, u32};
55

66
use super::symbol::Symbol;
@@ -67,7 +67,7 @@ impl VariableSymbol {
6767
// To be able to follow related fields, we need to have the base_attr set in order to find the __get__ hook in next_refs
6868
// we update the context here for the case where we are coming from a decorator for example.
6969
context = Some(HashMap::new());
70-
context.as_mut().unwrap().insert(Sy!("base_attr"), ContextValue::SYMBOL(parent.clone()));
70+
context.as_mut().unwrap().insert(S!("base_attr"), ContextValue::SYMBOL(parent.clone()));
7171
}
7272
let eval_weaks = Symbol::follow_ref(&symbol, session, &mut context, false, false, None, &mut vec![]);
7373
for eval_weak in eval_weaks.iter() {

server/src/core/xml_validation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{cell::RefCell, cmp::Ordering, collections::HashMap, hash::Hash, path::
33
use lsp_types::{Diagnostic, Position, Range};
44
use tracing::{info, trace};
55

6-
use crate::{constants::{BuildSteps, OYarn, SymType, DEBUG_STEPS, EXTENSION_NAME}, core::{diagnostics::{create_diagnostic, DiagnosticCode}, entry_point::{EntryPoint, EntryPointType}, evaluation::ContextValue, file_mgr::FileInfo, model::Model, odoo::SyncOdoo, symbols::symbol::Symbol, xml_data::{XmlData, XmlDataDelete, XmlDataMenuItem, XmlDataRecord, XmlDataTemplate}}, threads::SessionInfo, utils::compare_semver, Sy, S};
6+
use crate::{constants::{BuildSteps, OYarn, SymType, DEBUG_STEPS, EXTENSION_NAME}, core::{diagnostics::{create_diagnostic, DiagnosticCode}, entry_point::{EntryPoint, EntryPointType}, evaluation::ContextValue, file_mgr::FileInfo, model::Model, odoo::SyncOdoo, symbols::symbol::Symbol, xml_data::{XmlData, XmlDataDelete, XmlDataMenuItem, XmlDataRecord, XmlDataTemplate}}, oyarn, threads::SessionInfo, utils::compare_semver, Sy, S};
77

88

99

@@ -116,7 +116,7 @@ impl XmlValidator {
116116
if compare_semver(&session.sync_odoo.full_version, "18.2.0") >= Ordering::Equal {
117117
let translation = field.name.split("@").collect::<Vec<&str>>();
118118
if translation.len() > 1 {
119-
field_name = translation[0].to_string();
119+
field_name = oyarn!("{}", translation[0]);
120120
has_translation = true;
121121
//TODO check that the language exists
122122
}

0 commit comments

Comments
 (0)