Skip to content

[BUG] cant run verilator under wsl again #428

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

Closed
zoomer-k opened this issue Jun 12, 2023 · 1 comment · Fixed by #429
Closed

[BUG] cant run verilator under wsl again #428

zoomer-k opened this issue Jun 12, 2023 · 1 comment · Fixed by #429
Labels

Comments

@zoomer-k
Copy link
Contributor

 protected lint(doc: vscode.TextDocument) {
   let docUri: string = isWindows
     ? this.useWSL
       ? this.convertToWslPath(doc.uri.fsPath)
       : doc.uri.fsPath.replace(/\\/g, '/')
     : doc.uri.fsPath;
   let docFolder: string = isWindows
     ? this.useWSL
       ? this.convertToWslPath(path.dirname(doc.uri.fsPath))
       : path.dirname(doc.uri.fsPath).replace(/\\/g, '/')
     : path.dirname(doc.uri.fsPath);
   let cwd: string = this.runAtFileLocation
     ? isWindows
       ? path.dirname(docUri)
       : docFolder
     : vscode.workspace.workspaceFolders[0].uri.fsPath;
   let verilator: string = isWindows
     ? this.useWSL
       ? 'wsl verilator'
       : 'verilator_bin.exe'
     : 'verilator';

path.dirname(docUri) is changed to wsl path when docUri checked isWindows =true && useWSL = true

    let cwd: string = this.runAtFileLocation
      ? isWindows
        ? path.dirname(doc.uri.fsPath.replace(/\\/g, '/'))
        : docFolder
      : vscode.workspace.workspaceFolders[0].uri.fsPath;

I tested windows and wsl

@zoomer-k zoomer-k added the bug label Jun 12, 2023
@zoomer-k zoomer-k mentioned this issue Jun 12, 2023
@mshr-h
Copy link
Owner

mshr-h commented Jun 13, 2023

Thanks.
I thought we'd escaped from a rabbit hole of complexity :(

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

Successfully merging a pull request may close this issue.

2 participants