Closed juxeii closed 4 years ago
Hey, Well it works for me. Could you attach the logs? Not just a piece you think it is relevant but the whole from the start until the end. Just reproduce the issue don't have to run tests, etc... You can mask your personal data if you wish but won't be there much interesting.
Here is the for the first startup:
[2020-05-06 05:31:08.623] [INFO] {
uri: h {
scheme: 'file',
authority: '',
path: '/var/fpwork/reiss/gnb/cplane',
query: '',
fragment: '',
_formatted: 'file:///var/fpwork/reiss/gnb/cplane',
_fsPath: '/var/fpwork/reiss/gnb/cplane'
},
name: 'cplane',
index: 0
} linux v12.4.0 {
node: '12.4.0',
v8: '7.4.288.27-node.18',
uv: '1.29.1',
zlib: '1.2.11',
brotli: '1.0.7',
ares: '1.15.0',
modules: '72',
nghttp2: '1.38.0',
napi: '4',
llhttp: '1.1.3',
http_parser: '2.8.0',
openssl: '1.1.1b',
cldr: '35.1',
icu: '64.2',
tz: '2019a',
unicode: '12.1'
} 1.44.2
[2020-05-06 05:31:08.629] [INFO] sentry.io is false
[2020-05-06 05:31:08.638] [INFO] load called
[2020-05-06 05:31:08.639] [INFO] load started
[2020-05-06 05:31:08.640] [INFO] `test.advancedExecutables` is not defined. trying to use `test.executables`
[2020-05-06 05:31:08.641] [INFO] pattern /var/fpwork/reiss/gnb/cplane/build/bin/*UT /var/fpwork/reiss/gnb/cplane {
isAbsolute: true,
absPattern: '/var/fpwork/reiss/gnb/cplane/build/bin/*UT',
isPartOfWs: true,
relativeToWsPosix: 'build/bin/*UT'
}
[2020-05-06 05:31:08.641] [INFO] Absolute path is used for workspace directory. This is unnecessary, but it should work.
[2020-05-06 05:31:09.054] [INFO] load finished 0
[2020-05-06 05:31:10.352] [INFO] Sentry consent Sure! I love this extension and happy to help.
And after restart:
[2020-05-06 05:32:42.358] [INFO] {
uri: h {
scheme: 'file',
authority: '',
path: '/var/fpwork/reiss/gnb/cplane',
query: '',
fragment: '',
_formatted: 'file:///var/fpwork/reiss/gnb/cplane',
_fsPath: '/var/fpwork/reiss/gnb/cplane'
},
name: 'cplane',
index: 0
} linux v12.4.0 {
node: '12.4.0',
v8: '7.4.288.27-node.18',
uv: '1.29.1',
zlib: '1.2.11',
brotli: '1.0.7',
ares: '1.15.0',
modules: '72',
nghttp2: '1.38.0',
napi: '4',
llhttp: '1.1.3',
http_parser: '2.8.0',
openssl: '1.1.1b',
cldr: '35.1',
icu: '64.2',
tz: '2019a',
unicode: '12.1'
} 1.44.2
[2020-05-06 05:32:42.367] [INFO] sentry.io is false
[2020-05-06 05:32:42.380] [INFO] load called
[2020-05-06 05:32:42.381] [INFO] load started
[2020-05-06 05:32:42.382] [INFO] `test.advancedExecutables` is not defined. trying to use `test.executables`
[2020-05-06 05:32:42.384] [INFO] pattern /var/fpwork/reiss/gnb/cplane/build/bin/*UT /var/fpwork/reiss/gnb/cplane {
isAbsolute: true,
absPattern: '/var/fpwork/reiss/gnb/cplane/build/bin/*UT',
isPartOfWs: true,
relativeToWsPosix: 'build/bin/*UT'
}
[2020-05-06 05:32:42.384] [INFO] Absolute path is used for workspace directory. This is unnecessary, but it should work.
[2020-05-06 05:32:42.760] [INFO] load finished 0
[2020-05-06 05:32:43.861] [INFO] Sentry consent Sure! I love this extension and happy to help.
Do you need other logs? How can I change the log level of the extension?
You cannot change the log level.
That is the end of the log? The code tries to set the setting and if there is an error it should log it.
Hm..
In your user's settings.json (not the one inside the .vscode) you should have "testMate.cpp.log.logSentry": "enable"
. Can you see that?
Okay, I have an idea what caused the problem.
I screwed up the migration of this special variable. Do you have a variable in workspace settings.json catch2TestExplorer.logSentry
?
In user settings.json there are these two entries:
"testMate.cpp.log.userId": "00755c2ff1937ebb49bf9393ac6507d8b7f2c81d", "testMate.cpp.log.logSentry": "enable"
Both are "greyed" out saying
This setting cannot be applied in this window. It will be applied when you open local window.
No catch2TestExplorer
?
Nothing in the workspace or workspaceFolder settings.json?
Have to ask: Are you familiar with this multi level vscode settings strucutre?
In workspace folder I have
"testMate.cpp.test.executables": "/var/fpwork/reiss/gnb/cplane/build/bin/*UT"
I remember that some 2 days ago(or so) I had an entry with catch2TestExplorer
for the executables pattern, but that had yellow squiggles and vsc replaced it with the above entry to make setting.json clean again.
Yes, I know the hirarchy. What entries do you want?
Yes.
Well that's a quite important piece of information. I will add this to the issue template. :)
Okay, I see whats the problem here. Hold on..
May I ask two more questions: 1) Are variable substitutions supported in executables pattern? E.g. ${env:UT}/somePath/tests 2) We have quite a big code base. If I open the extension on the left, it will start search for executables. This takes some minutes. Would it be possible to configure that this will be done automatically after vscode startup?
EDIT: Too bad github removed private messages :(
Your issue will be fixed in 3.0.2 Thanks for reporting it. (release is done)
Sure, happy to help.
${os_env:<varname>}
. Let me draw your attention to some special variables which will also work:
${osPathSep}
${osPathEnvSep}
,${if(iswin)}<W>${else}<U>${endif}
I thought about creating a gitter account might be useful for somebody, but I'm not sure. This extension has so small user base :)
1) Ok, will try os_env
instead of env
2) You are right that if I am very specific with the pattern then there is a speedup. But usually I need all tests in the project. And we have lots of them. It would be really helpful if the extension would scan for tests after startup(maybe even create some cache mechanism). Because sometimes I miss to open the extension in the beginning. But right at that point I would need to execute some tests, so I have to wait some minutes before the executables are scanned. Such on optional feature would be greate("Search for executables on startup").
Well test list caching feature actually exists: testMate.cpp.discovery.testListCaching
Let me know the performance of that.
Ok, will test that. Btw: notification problem is fixed, many thx for the fast fix :D
I think that caching improves the loading time. Still, an automatic load would be great.
I found an option.. working on that.
2 options.. lol One is even better than the other
I also figured out how to run the tests automatically at startup. Description is at support page.
I added
{
"label": "Activate Test Explorer",
"command": "${command:test-explorer.reload}", // For running use "${command:test-explorer.run-all}"
"problemMatcher": [],
"runOptions": {
"runOn": "folderOpen" // This will cause the trigger. Have to run manually once!
}
}
totasks.json
but after startup I get
Executing task: ${command:test-explorer.reload} <
The terminal shell path "${command:test-explorer.reload}" does not exist
Terminal will be reused by tasks, press any key to close it.
Can you run it manually? Is that work?
Same output when I run it manually. But it is strange that when I open the extension some minutes after startup, all tests are immedeatly loaded anyway. That is exactly what I wanted and i could live with this warning ;)
Using remote right? I have some ideas. Maybe the remote need more time to process all the load events. Or maybe it is fast because of the caching? Is it slow again if you remove the task? In the first case it is probably vscode or vscode remote related issue.
There is another way I will release it later but won’t publish officially because this is the nice way. But if you need for workaround we can try that too
I disabled caching but it works as expected. After some time when I open the extension all tests are loaded straight away. The warning is still there and I cannot even understand how that could possibly work...but it does :)
Could it be a problem that I use https://github.com/hbenl/vscode-test-explorer?
I have a different task defined with something like ${command:extension.commandvariable.selectedText
So I tried to add extension
after command
but that did not help.
Test Explorer is the UI part of of my extension. No, I suspect its a vscode/vscode-remote issue. It should be reported. Meanwhile you can hide the error with this:
{
"label": "Load TestMate",
"command": "${command:test-explorer.reload}",
"problemMatcher": [],
"runOptions": {
"runOn": "folderOpen"
},
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
}
See solution here: https://github.com/microsoft/vscode/issues/97119
Nice, thanks. Updated the doc.
Checklist
Describe the bug A notification is shown about
sentry.io
. No matter what you click here(accept or decline) it will show up again on every project start.Screenshots (optional)