Skip to content

Error when no css file is found or cannot be parsed (false negative) #119

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

Open
dpizetta opened this issue Feb 14, 2018 · 5 comments
Open

Comments

@dpizetta
Copy link

dpizetta commented Feb 14, 2018

Steps to reproduce:

Create a new project or open a folder in vscode (python in my case);
(this project does not contain a css file or some folder does not contain a css file)
Close vscode;
Reopen vscode in this project;

Output:

Failed to cache the CSS classes in the workspace for the first time: Failed to cache the class definitions during the iterations over the documents that were founds: command failed with error code 1: error parsing glob '!/.pyc': invalid use of ; must be one path component

Expected output:

Nothing :)

PS: maybe a misspelled word in that message:

were founds -> were found

Disabling this plugin works fine.
VS Code
Version 1.20.1
Commit f88bbf9137d24d36d968ea6b2911786bfe103002
Date 2018-02-13T15:31:21.019Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
Linux Ubuntu 16.04

screenshot linux 2018-02-14 15 40 56

Obs: I work with CSS stylesheets for PyQt, PySide, so I used to work with both, .py and .css, files.

Tks in advance

@zignd
Copy link
Owner

zignd commented Feb 17, 2018

I believe I fixed this bug in the latest version; there was even an issue previously associated with it, #114. Also, I tried to reproduce it following your instructions, but nothing happened. Therefore, I believe it is fixed already. Are you using the extension on version 1.16.2? Is it still happening?

By the way, thanks for noticing the typo, will be fixed. :)

@dpizetta
Copy link
Author

Hi, I'm on version 1.17.1 (Fev 18, 2018).

I get the log to you to check.

I think that maybe is something related to this issue.

My config:

    "files.exclude": {
        "**/.git": true,
        "**/.gitignore": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/.hgignore": true,
        "**/.hgtags": true,
        "**/.arcconfig": true,
        "**/.env": true,
        "**/.cache": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/__pycache__":true,
        "**/*.pyc": true,
        "**/*.bkp":true,
        "**/*.egg**":true,
        ".spyproject":true,
        ".project":true,
        ".pydevproject**":true,
        ".settings**":true,
        ".vscode**":true,
        ".mypy_cache**":true,
        ".tox**":true
    }

Log:
screenshot linux 2018-02-19 12 01 21

If you need something more, please let me know. Tks

@dpizetta
Copy link
Author

Your code is having problems with all type of "**/**.ext": true, I checked this end the correct is to use "**/*.ext": true (just one asterisk). But with VS Code and all other extensions, it works fine. I don't know if this could be reported in VS Code to alert the user or you can parse both as correct.

@zignd
Copy link
Owner

zignd commented Feb 20, 2018

That's unexpected, mainly because the extension is not even using a third-party library for those searchs, it's sonely a call to vscode.workspace.findFiles, a function exposed by the VS Code API, https://github.com/zignd/HTML-CSS-Class-Completion/blob/master/src/fetcher.ts#L18.

I will look into that tomorrow as soon as I can, but the other day I had another issue with the search API and it seemed to be related to a change in this function's code, I even managed to track at the time I was creating a workaround in the extension.

Thanks for the report and for providing all those details.

@zignd zignd added the bug label Feb 20, 2018
@dpizetta
Copy link
Author

Tks :) Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants