I think it’s somewhere in here.
// projectRootPath is already normalized (NormalizedPath) from findProjectRootOfFile
// Use getProjectFile to verify the project exists
const project = utils.getProjectFile(projectRootPath);
If I log out project I get this:
{
openFiles: Set(1) { '/home/josh/Dev/rescript-lang.org/src/Mdx.res' },
filesWithDiagnostics: Set(0) {},
filesDiagnostics: {},
namespaceName: '',
rescriptVersion: '12.0.0',
bsbWatcherByEditor: null,
buildRootPath: null,
bscBinaryLocation: '/home/josh/Dev/rescript-lang.org/node_modules/@rescript/linux-x64/bin/bsc.exe',
editorAnalysisLocation: '/home/josh/Dev/rescript-lang.org/node_modules/@rescript/linux-x64/bin/rescript-editor-analysis.exe',
hasPromptedToStartBuild: true
}
I don’t think buildRootPath should be null.
This is also interesting:
buildSystem: 'bsb',
buildRewatch: null,
buildNinja: null,
If it’s using bsb and not rewatch, could that be the reason why I have to restart the extension to pick up changes? There are also no incremental files being generated, but nothing changes if I disable incremental, it still doesn’t work.
Update 1
It’s something off with updating the intellisense, code lens, and inlay hints. It logs out the warnings and file as expected, it’s just not applying any updates. Restarting it does show everything correctly. I’m trying to find if there is a difference between first load and updates.
The dot completion does not work, but I can get autocomplete suggestions after typing in ->.
Update 2
I had to tweak the way watch files were created: fix: update globs to work on windows with WSL by jderochervlk · Pull Request #1178 · rescript-lang/rescript-vscode · GitHub
I also had to have the incrementalTypechecking type checking turned on along with that fix, but I am OK with that.