News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Code completion issues : Nightly build 13231

Started by draughlin, April 04, 2023, 06:16:46 AM

Previous topic - Next topic

ollydbg

Quote from: draughlin on April 06, 2023, 12:21:15 AM
Hi,
I dont double click on .cbp file.
I always use cblauncher directly.
I use cblauncher everyday too.
OK. Maybe it is a bug.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

draughlin

Hi Olly!
I tried again with a fresh install of svn 13231 (fourth time) with cblauncher.exe, and this time all went as it should. I could not reproduce the problems I had before. I managed to swap between "code completion" plugin and "clangd_client" plugin several times without issue. Perhaps I had a corruption in settings (default.conf under local AppData folder that cblauncher uses.) I have about ten different compilers and cross compilers installed. So I am at a loss to explain it to my satisfaction.

ollydbg

Quote from: draughlin on April 06, 2023, 03:53:56 AM
Hi Olly!
I tried again with a fresh install of svn 13231 (fourth time) with cblauncher.exe, and this time all went as it should. I could not reproduce the problems I had before. I managed to swap between "code completion" plugin and "clangd_client" plugin several times without issue. Perhaps I had a corruption in settings (default.conf under local AppData folder that cblauncher uses.) I have about ten different compilers and cross compilers installed. So I am at a loss to explain it to my satisfaction.

I have just read/debug some of the config file reading like:

wxString CfgMgrBldr::FindConfigFile(const wxString& filename)
{

    wxString u(ConfigManager::GetUserDataFolder() + wxFILE_SEP_PATH + filename);
    wxString exePath(::DetermineExecutablePath());
    wxString e(exePath + wxFILE_SEP_PATH + filename);

    if (!ConfigManager::has_alternate_user_data_path && ::wxFileExists(e))
    {
        ConfigManager::SetUserDataFolder(exePath);
        return e;
    }
    if (::wxFileExists(u))
    {
        return u;
    }
    return wxEmptyString;
}


I can't see the error in the code. I'm grad that it works OK now in your PC.

I think you can use different files when you have different settings, for example:

CbLauncher.exe -p myclangd

In the above command, a file named myclangd.conf will be created which contains its own user setting, not the default.conf.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

draughlin