Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: when using module-dirs from project, make dirs absolute (#1690)
I noticed an issue where the LSP was not clearing the diagnostics correctly for modules when rebuilding. It turned out that the `module.Dir` was only relative when loaded from the project `toml` vs. absolute when used with `"."` or `ftl dev example/go`. This change makes sure we set the absolute paths on the `config.ModuleDirs` and `config.ExternalDirs` when loading them from `ftl-project.toml` files. Before this change the `lsp` would try to clear files with the following path. This would result in LSP errors never being cleared. ```bash lsp: Clearing diagnostics for file:///examples/go/echo ``` This update, ensures that path is absolute ```bash lsp: Clearing diagnostics for file:///Users/wesbillman/dev/ftl/examples/go/echo ```
- Loading branch information