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

Environment variables not expanded on Linux settings.json #913

Open
ProtossGP32 opened this issue Jul 9, 2023 · 2 comments
Open

Environment variables not expanded on Linux settings.json #913

ProtossGP32 opened this issue Jul 9, 2023 · 2 comments

Comments

@ProtossGP32
Copy link

VSCODE version: 1.79.2
ISSUE: When creating a project from zero, Genesis code configures the settings.json like this:

{ 
    "C_Cpp.default.includePath": ["${env:GENDEV}/sgdk/inc",
    "${env:GENDEV}/sgdk/res",
    "res",
    "inc"
]
}

But the ${env:GENDEV} is empty, even though I've exported it in my .bashrc file. This prevents to include the SGDK resources paths:
image

I've also tried to overwrite the variables in the Genesis Code settings but the results are the same. The current workaround is to replace the ${env:GENDEV} variable in the settings.json with the current SGDK path (variable ${env:HOME} is expanded correctly, for example).

@zerasul
Copy link
Owner

zerasul commented Jul 9, 2023

Hi Marc:

It seems there are some problem using GENDEV en variable. Are you using Gendev project? or are you using a docker image?

The env variable GENDEV need to be configured on your bash as a enviroment variable to use it to configure include paths.

The GENDEV configuration variable is only used for compilation pruposes, Try to put your absolute path on the settings.json file.

Remember: if you are using marsdev change the toolchain type configuration selector.

@ProtossGP32
Copy link
Author

ProtossGP32 commented Jul 9, 2023

Hi zerasul:
I'm using the Doragasu image to compile the project, but I understand that the resolution of the paths simply relies on the C__Cpp.default.includePath array defined in the settings.json.

As I said in the first message, It's Genesis Code who configures these paths by using the ${env:GENDEV} variable, and the issue of not finding the SGDK resources is resolved when replacing it with either the absolute path or using other environment variables provided by VSCODE, but none of the ones defined in the Genesis Code Settings.

So the thing is, if ${env:GENDEV} can't be used in settings.json, why does a Genesis Code: create project command use it to compose the includePath paths of the SGDK? Shouldn't it be replaced with something else?

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

No branches or pull requests

2 participants