Skip to content
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

setup_new_project generates incorrect syntax #310

Open
TheSandvichMaker opened this issue May 19, 2021 · 0 comments
Open

setup_new_project generates incorrect syntax #310

TheSandvichMaker opened this issue May 19, 2021 · 0 comments
Labels
bug The issue is a straight up bug, performance bug, crash bug, etc

Comments

@TheSandvichMaker
Copy link

TheSandvichMaker commented May 19, 2021

Version: 4.1.7

When you use setup_new_project, the fkey_command entry it generates uses semicolons where it should use commas:

fkey_command = {
.F1 = "run"; // should be commas
.F2 = "run";
};

and the load_paths_base presumes that an initial anonymous string will specify the path, but this is incorrect.

load_paths_base = {
 { ".", .relative = true, .recursive = true, },
};

load_project looks for a key named path, which is not specified here, and so the base path is null. It is only because this is a relative path that this accidentally works, because the project directory is looked up automatically.

The correct version is

load_paths_base = {
 { .path = ".", .relative = true, .recursive = true, },
};

An additional thing highlighted by this bug is that if you incorrectly specify a non-relative recursive path, this destroys 4coder one way or another. That is to say:

load_paths_base = {
 { ".", .relative = true, .recursive = true, },
 { "C:/my/cool/path", .relative = false, .recursive = true, }, // nice additional path
};

Will lock up 4coder for me on windows, stuck somewhere inside a syscall in ntdll.dll.

@TheSandvichMaker TheSandvichMaker added the bug The issue is a straight up bug, performance bug, crash bug, etc label May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a straight up bug, performance bug, crash bug, etc
Projects
None yet
Development

No branches or pull requests

1 participant