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

dendron-markdown-links: extension runtime error #3311

Open
gour opened this issue Mar 20, 2021 · 2 comments
Open

dendron-markdown-links: extension runtime error #3311

gour opened this issue Mar 20, 2021 · 2 comments
Labels
A-extension Area: Extension/plugin integration, vscode or VimL bug Something isn't working L-markdown Language: Markdown

Comments

@gour
Copy link

gour commented Mar 20, 2021

Hello,

After resolving #3268 I've installed some more extensions to be used with Dendron and the one produces extension runtime error - see the shot below:
dendron-markdown-links

I'm also including debug & trace log files...

debug.log
trace.log

@bryphe
Copy link
Member

bryphe commented Mar 25, 2021

Thanks for the logs, @gour !

I looked into this - it looks like this particular error also is produced when running via VSCode:

image

(It seems the extension runtime errors aren't bubbled up in quite the same way, though).

The main issue is this line of code:
https://github.com/dendronhq/markdown-links/blob/ba7d189da5541d6c47c5aa99cbca76255024bdcd/src/dendron/base.ts#L98

export async function setupDendron(context: vscode.ExtensionContext) {
  const ctx = "setupDendron";
  const wsRoot = path.dirname(
    vscode.workspace?.workspaceFile?.fsPath as string
  );

If there is no workspace configuration file - the vscode.workspace?.workspaceFile?.fsPath will evaluate to null, and the exception is produced by path.dirname(null)

There are a few other blockers for this extension, like the core dendron issue - in particular the #3128 support is needed

@bryphe bryphe added A-extension Area: Extension/plugin integration, vscode or VimL bug Something isn't working L-markdown Language: Markdown labels Mar 25, 2021
@gjroelofs
Copy link

The Dendron bug has been noted upstream and is planned to be fixed in April. See: dendronhq/dendron#322

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-extension Area: Extension/plugin integration, vscode or VimL bug Something isn't working L-markdown Language: Markdown
Projects
None yet
Development

No branches or pull requests

3 participants