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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension(v0.2.2) fails to load on startup in vscode v1.0.1-insider (Win7) #3

Closed
andischerer opened this issue Apr 22, 2016 · 8 comments

Comments

@andischerer
Copy link

Hi There,

first of all 馃憤 for this extension.

If i start vscode v1.0.1-insider the indent guides aren't visible anymore.
Here is the corresponding callstack:
image

This is because this.configurations.get here and here returns undefined so the forEach loop fails.

I havent set any of the Guide settings in my custom user settings. I testwise added undefinded checks for this.configurations.get and the extension starts working again. Maybe there was an api change for this.configurations.get from the vscode folks.

Thanks again

@andischerer andischerer changed the title Extensions fails to load on startup in vscode v1.0.1-insider (Win7) Extension(v0.2.2) fails to load on startup in vscode v1.0.1-insider (Win7) Apr 22, 2016
@spywhere
Copy link
Owner

spywhere commented Apr 22, 2016

Could you check the settings file (not yours but the default one)? The only way that leads to this issue is the default settings are not set. configurations.get will use default settings when there is not option set in the user's settings file (may be this was change in insider builds as you told).

Anyway, I will add additional default to the code so this issue won't occur again.

@spywhere spywhere added the bug label Apr 22, 2016
@andischerer
Copy link
Author

There is actually a guides section in the default settings:

//-------- Guides Configurations --------

    // Indentation background colors.
    "guides.indent.backgrounds": [],

    // Hide indentation background in selections.
    "guides.indent.hideBackgroundOnSelection": true,

    // Show start-of-line indentation guides.
    "guides.indent.showFirstIndentGuides": true,

    // Normal indentation guides rendering width.
    "guides.normal.width": "1px",

    // Normal indentation guides rendering color.
    "guides.normal.color": "rgba(60, 60, 60, 0.75)",

    // Normal indentation guides rendering style.
    "guides.normal.style": "solid",

    // Hide normal indentation guides in selections.
    "guides.normal.hideOnSelection": true,

    // Enable active indentation guides in addition to normal indentation guides.
    "guides.active.enabled": true,

    // Active indentation guides rendering width.
    "guides.active.width": "1px",

    // Active indentation guides rendering color.
    "guides.active.color": "rgba(120, 60, 60, 0.75)",

    // Active indentation guides rendering style.
    "guides.active.style": "solid",

    // Hide active indentation guides in selections.
    "guides.active.hideOnSelection": true,

    // Ruler guide stop points.
    "guides.rulers": [],

    // Ruler guides rendering width.
    "guides.ruler.width": "1px",

    // Ruler guides rendering color.
    "guides.ruler.color": "#cc9999",

    // Ruler guides rendering style.
    "guides.ruler.style": "solid",

    // Hide ruler guides in selections.
    "guides.ruler.hideOnSelection": true,

    // Time duration between each guide lines update (in seconds).
    "guides.updateDelay": 0.1,

    // Override default Visual Studio Code behaviours (such as indentation guides or rulers).
    "guides.overrideDefault": false,

@andischerer
Copy link
Author

I've debugged a little further. Seems like any extension specific settings couldn' be loaded in 1.0.1-insiders.
e.g
vscode.workspace.getConfiguration("tslint") returns an empty Object
while
vscode.workspace.getConfiguration("editor") returns all editor settings

I've downgraded to vscode 1.0 and everything was working fine again. So it looks like this is a bug in insiders build.

@spywhere
Copy link
Owner

spywhere commented Apr 22, 2016

Thanks, I also working on which extension has affect with this issue (so I can file an issue to vscode team). If you don't mind, can you share which extensions have affected so far?

Some extensions have handle this issue already (for example "Clock in Status Bar" extension).

@andischerer
Copy link
Author

Extensions i've tested so far:

Guides
CoffeeLint
TSlint
Path Intellisense

Looks like every user installed extension couldnt load their settings. workspace.getConfiguration('extension') returns an empty object.

@spywhere
Copy link
Owner

Thanks. I will file the issue now :)

@andischerer
Copy link
Author

Np.

btw i discovered a new default setting in insiders:

    // Controls whether the editor should render indent guides
    "editor.indentGuides": false,

there is now a buildin support for indent guides in vscode. Although not as feature rich compared to your extension.

@spywhere
Copy link
Owner

spywhere commented Apr 22, 2016

Yup, that is expectable. They are working on built-in indent guide in this iteration for this month release.

More features plan: microsoft/vscode#4888

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