rescript-lang / rescript-lang/vim-rescript

Incorrect resource paths

Open
#59 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
164
Forks
17
PR merge metrics
No merged PRs in 30d

Description

For some reason, on my setup, the following code results in the wrong paths:

let g:rescript_bsc_exe = getcwd() . "/" . l:res_bin_dir . "/bsc.exe"
let g:rescript_bsb_exe = getcwd() . "/" . l:res_bin_dir . "/bsb.exe"

The path l:res_bin_dir is already absolute, so prepending getcwd() adds redundant directories to the front and makes the path wrong.

This change fixes the paths on my system: https://github.com/ellbur/vim-rescript/commit/b42b94e939c1827d8ca32d0bbc46f5340755e796

I don't know much about vimscript so I don't know if that would cause problems on other systems.

My system is: Linux (Manjaro), NeoVim 0.6.1.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the code that assigns g:rescript_bsc_exe and g:rescript_bsb_exe, then inspect how l:res_bin_dir is formed and whether it is already absolute. Verify the path construction on Neovim 0.6.1 or another supported setup, and confirm that both executable paths no longer receive a redundant getcwd() prefix.

Written by the indexing model from the issue text.

Assessment

Tech stack
neovim, vim
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.