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

[VSCodeCounter] There was no target file. #12

Open
JoseluisSanchez opened this issue Nov 15, 2019 · 11 comments
Open

[VSCodeCounter] There was no target file. #12

JoseluisSanchez opened this issue Nov 15, 2019 · 11 comments

Comments

@JoseluisSanchez
Copy link

I'm trying this extensipn and when pick the option 'count lines in directory' I get the message: [VSCodeCounter] There was no target file.
I'm using the extension with .prg - harbour - files.
Can you help me ?

Regards

@uctakeoff
Copy link
Owner

VSCodeCounter itself has no language parsing function.

https://marketplace.visualstudio.com/items?itemName=ekon.harbour

I confirmed that it works by installing the above extension.

@JoseluisSanchez
Copy link
Author

I'm using this extension for Harbour
https://github.com/APerricone/harbourCodeExtension
I'll try doing a clean installation of VSCode to see if it works.
Regards,

@JoseluisSanchez
Copy link
Author

I have make the extension work in one of my computers at work, but at home in my laptop it doesn't work. When I run the extension, the file generates this content:

Date : 2019-11-18 17:08:41
Directory : c:\alanit\develop\fester\prg
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines

Languages
+----------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+----------+------------+------------+------------+------------+------------+
+----------+------------+------------+------------+------------+------------+

Directories
+--------------------------------------------------------------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+--------------------------------------------------------------+------------+------------+------------+------------+------------+
+--------------------------------------------------------------+------------+------------+------------+------------+------------+

Files
+--------------------------------------------------------------+----------+------------+------------+------------+------------+
| filename | language | code | comment | blank | total |
+--------------------------------------------------------------+----------+------------+------------+------------+------------+
| c:\alanit\develop\fester\prg\Alanit\TRecordBiel.prg | (Unsupported) | -1 | 0 | 0 | -1 |
| c:\alanit\develop\fester\prg\Alanit\TRecordBiel2.prg | (Unsupported) | -1 | 0 | 0 | -1 |
| c:\alanit\develop\fester\prg\Alanit\main.prg | (Unsupported) | -1 | 0 | 0 | -1 |
| c:\alanit\develop\fester\prg\Alanit\tInforme.prg | (Unsupported) | -1 | 0 | 0 | -1 |
| c:\alanit\develop\fester\prg\Alanit\tfsdi.prg | (Unsupported) | -1 | 0 | 0 | -1 |
| c:\alanit\develop\fester\prg\Alanit\trecord.prg | (Unsupported) | -1 | 0 | 0 | -1 |
| c:\alanit\develop\fester\prg\Alanit\ut_brw.prg | (Unsupported) | -1 | 0 | 0 | -1 |
| c:\alanit\develop\fester\prg\Alanit\ut_calend.prg | (Unsupported) | -1 | 0 | 0 | -1 |
| c:\alanit\develop\fester\prg\Alanit\ut_common.prg | (Unsupported) | -1 | 0 | 0 | -1 |
| c:\alanit\develop\fester\prg\Alanit\ut_dbf.prg | (Unsupported) | -1 | 0 | 0 | -1 |
| c:\alanit\develop\fester\prg\Alanit\ut_index.prg | (Unsupported) | -1 | 0 | 0 | -1 |
| c:\alanit\develop\fester\prg\Alanit\ut_index.prg.bak | (Unsupported) | -1 | 0 | 0 | -1 |
...
How can I do for support Harbour files in your extension ?

Regards,
José Luis

@uctakeoff
Copy link
Owner

The difference is whether the Ignore Unsupported File option is ON or OFF.

VSCodeCounter refers to the language extension table inside VSCode.
Have you tried the Harbor extension?

@JoseluisSanchez
Copy link
Author

I've tried your extensión in 3 computers, in one of them it works but in the others doesn't. All they have installed harbourCodeExtension.
Where can I find the language extension table inside VSCode ?
Regards,

@uctakeoff
Copy link
Owner

It seems that the setting may not be reflected unless it is restarted.
If not try it.

According to the debug log of the program, the grammar configuration file of the harbor file referenced the following file:

{home dir}\.vscode\extensions\aperricone.harbour-0.9.5\syntaxes\language-configuration.json
(Windows10)

please make sure.

@APerricone
Copy link

looks the problem is that in my extension did define the extension without the dot.

I added the dot in the last commit APerricone/harbourCodeExtension@d306520

@uctakeoff
Copy link
Owner

I did was find the cause just now too.
I hope this solves the problem.

@JoseluisSanchez
Copy link
Author

Thanks to both for your kind support, I'll try later but I'm sure that now the extensión will work fine.

Regards,

@APerricone
Copy link

APerricone commented Nov 20, 2019

Anyway the result can be incorrect, harbour is a strange language:
The comment starts with // or with && (rarely used i think)
If the line starts with asterisk or the word "note" this line is a comment, unless the line before ends with a semicolon, in this case is the continuous of previous line.
As plus, you can include C source code inside the pragma dump...
So, it is a mess.

Theoretically my or your extension can export an method to manage this extreme case, see https://code.visualstudio.com/api/references/vscode-api#extensions

If the other extension is not installed it returns undefined.

@legenddcr
Copy link

I also encountered this issue. It is better if the dependency issue could be resolved by extension.

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

4 participants