Skip to content

Conversation

@mmahrouss
Copy link
Collaborator

No description provided.

@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.
⚠️ A 'println!(' statement was found in the commit. Please ensure debug statements are removed before merging.

4 similar comments
@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.
⚠️ A 'println!(' statement was found in the commit. Please ensure debug statements are removed before merging.

@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.
⚠️ A 'println!(' statement was found in the commit. Please ensure debug statements are removed before merging.

@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.
⚠️ A 'println!(' statement was found in the commit. Please ensure debug statements are removed before merging.

@github-actions
Copy link

github-actions bot commented Jun 4, 2025

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.
⚠️ A 'println!(' statement was found in the commit. Please ensure debug statements are removed before merging.

@github-actions
Copy link

github-actions bot commented Jun 4, 2025

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

1 similar comment
@github-actions
Copy link

github-actions bot commented Jun 4, 2025

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@github-actions
Copy link

github-actions bot commented Jun 4, 2025

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@mmahrouss mmahrouss changed the title WIP: New config [IMP] server,vscode: new config structure Jun 4, 2025
@github-actions
Copy link

github-actions bot commented Jun 4, 2025

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

4 similar comments
@github-actions
Copy link

github-actions bot commented Jun 5, 2025

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@mmahrouss mmahrouss changed the base branch from master to master-xml-fda June 11, 2025 12:38
@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

3 similar comments
@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@mmahrouss mmahrouss marked this pull request as ready for review June 16, 2025 08:55
@mmahrouss mmahrouss requested a review from fda-odoo June 16, 2025 08:55
@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@fda-odoo fda-odoo force-pushed the master-xml-fda branch 2 times, most recently from 7c13674 to d6e3688 Compare June 17, 2025 12:56
@mmahrouss mmahrouss changed the base branch from master-xml-fda to master June 18, 2025 13:48
@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@github-actions
Copy link

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

config.additional_stubs = self.cli.stubs.clone().unwrap_or(vec![]);
config.stdlib = self.cli.stdlib.clone().unwrap_or(S!(""));
config.additional_stubs = self.cli.stubs.clone().unwrap_or(vec![]).into_iter().collect();
// config.stdlib = self.cli.stdlib.clone().unwrap_or(S!(""));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you remove no_typeshed and stdlib temporarily?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did that a while ago, I think it is a mistake. I might have removed no_typeshed because it was in the Config Struct, but never actually set, and it was always false.

I do now see that I made a mistake because it was in the CLI Args, is it intentional to keep it only settable from the CLI?

Or was it a missing implementation that it was not set in the config too ?

So I should integrate it into the new config, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, Config.stdlib_dir was always set to an empty str.

So this code was never reached. and the same with no_typeshed

https://github.com/odoo/odoo-ls/pull/315/files#diff-4daf614f5a24fc5c7e9eb757d068129805c3dcbad28168b57c6cc25b883bd77fL164-L166

However, the right thing to do is not to remove them

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I should add stdlib and no_typeshed to the new config, given that they were not in the old one?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they are actually parameters for CLI only (used on runbot for example). std_lib is maybe never used for now, but I wanted to make it parametrizable.
Anyway we will need to add more parameters in the future

pub struct FileMgr {
pub files: HashMap<String, Rc<RefCell<FileInfo>>>,
workspace_folder: Vec<String>,
workspace_folder: HashMap<String, String>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happen if you open two directories with the same name? Isn't it colliding?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will test that, I suppose the client should somehow distinguish them in some way.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I am wrong, the name is not unique, I will have to fix that. Will push a commit to handle that

serde_json::Value::String(config_file.to_html_string())
);
session.send_notification(
"$Odoo/setConfiguration",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

};
let selected_config = match maybe_selected_config {
None => {
session.show_message(MessageType::INFO, String::from("No Odoo configuration selected. Please select a configuration in the settings."));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we take the first by default if the setting doesn't exist in the config?
Else any IDE implementation that doesn't implement the config switch interface won't be able to use it?
I don't know

@github-actions
Copy link

github-actions bot commented Jul 1, 2025

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@github-actions
Copy link

github-actions bot commented Jul 1, 2025

⚠️ The file 'Cargo.toml or constant.rs' has been modified in this PR. Please review the changes carefully.

@mmahrouss mmahrouss requested a review from fda-odoo July 2, 2025 08:54
@fda-odoo fda-odoo merged commit 33c3e04 into master Jul 2, 2025
1 check passed
@mmahrouss mmahrouss deleted the new-config branch July 2, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants