Closed Extra-Creativity closed 1 year ago
These are two questions, please refer to the vscode question, separately to https://github.com/xmake-io/xmake-vscode/issues
cause incorrect groups in vscode.
local relativeDir = string.sub(scriptDir, #projectDir + 2)
try
local relativeDir = path.relative(scriptDir, projectDir)
Two questions:
Why will this work but the other will not?
string.sub(scriptDir, #projectDir + 2)
If projectDir is the same as scriptDir (GlobalTest target), it will return the empty string.
I've improved it on the dev branch, but it's still an invalid group name and xmake/dev will still ignore this group, but at least it won't throw an exception error
path.relative(scriptDir, projectDir)
it will return "."
It seems that the groups are still incorrect, like this:
It works for me.
Okay, works for me now when I omit the root directory, apologize for my carelessness.
Xmake Version
2.7.5
Operating System Version and Architecture
Win10 22H2, x86_64
Describe Bug
The minimal project that causes this bug has been uploaded to my temporary repository.
In this project,
set_group
here will:xmake project -a "x64" -k vsxmake -m "debug;release"
).In the second problem, running with
-D
will prompt error information as :Expected Behavior
Test2
a subgroup ofTest
.Project Configuration
No response
Additional Information and Error Logs
No response