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

[BUG] cant run verilator under WSL #418

Closed
zoomer-k opened this issue May 30, 2023 · 2 comments
Closed

[BUG] cant run verilator under WSL #418

zoomer-k opened this issue May 30, 2023 · 2 comments
Labels

Comments

@zoomer-k
Copy link
Contributor

Describe the bug
cant run verilator under WSL

Environment (please complete the following information):

  • OS: [e.g. Windows 10 22H2 build 19045.2965]
  • VS Code version [1.78.2]
  • Extension version [1.9.0 - latest]

Steps to reproduce
Steps to reproduce the behavior:

  1. Open .v or .sv file
  2. Check output (verilog)
  3. no warning detect

Log
Attach the log generated while following the above steps
2023-05-30 11:56:14.235 [info] mshr-h.veriloghdl is now active.
2023-05-30 11:56:14.235 [info] [Ctags] ctags manager configure
2023-05-30 11:56:14.235 [info] [lint-manager] Using linter: verilator
2023-05-30 11:56:14.235 [info] Rewrote docUri to /mnt/d/verilog/test.sv for WSL
2023-05-30 11:56:14.235 [info] Rewrote docFolder to /mnt/d/verilog for WSL
2023-05-30 11:56:14.235 [info] [verilator] Execute
2023-05-30 11:56:14.235 [info] [verilator] command: wsl verilator -sv --lint-only -I"/mnt/d/verilog" "/mnt/d/verilog/test.sv"
2023-05-30 11:56:14.235 [info] [verilator] cwd : /mnt/d/verilog
2023-05-30 11:56:14.235 [info] mshr-h.veriloghdl activation finished.
2023-05-30 11:56:14.235 [info] [verilator] 0 errors/warnings returned

Expected behavior
some warning detect
(ver 1.8.1 can detect warning)

problem point
ver 1.9.0

docFolder = this.convertToWslPath(docFolder);
this.logger.info(`Rewrote docFolder to ${docFolder} for WSL`);

docFolder is wls path .
but child.exec( { cwd : cwd }) need windows path

solve way
add step cwd select (isWindows)

  let cwd: string = this.runAtFileLocation
    ? isWindows
      ? cwdWin
      : docFolder
    : vscode.workspace.workspaceFolders[0].uri.fsPath;

cwdWin is

let cwdWin: string = path.dirname(docUri);

I checked solving problem but not check side effect

@zoomer-k zoomer-k added the bug label May 30, 2023
@mshr-h
Copy link
Owner

mshr-h commented May 30, 2023

Ok. Looks good to me.
Can you make the PR if possible?

@zoomer-k
Copy link
Contributor Author

thanks your attention
I'll try it
fix SlagLinter.ts same time

@mshr-h mshr-h closed this as completed in 6648225 Jun 1, 2023
mshr-h added a commit that referenced this issue Jun 1, 2023
mshr-h added a commit that referenced this issue Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants