Skip to content

Use canonical path in sketchRoot #61

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

Merged
merged 2 commits into from
Feb 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ func (handler *InoHandler) initializeWorkbench(ctx context.Context, params *lsp.

if buildPath, err := handler.generateBuildEnvironment(); err == nil {
handler.buildPath = buildPath
handler.buildSketchRoot = buildPath.Join("sketch")
handler.buildSketchRoot = buildPath.Join("sketch").Canonical()
} else {
return err
}
Expand Down Expand Up @@ -977,7 +977,7 @@ func (handler *InoHandler) ino2cppDocumentURI(inoURI lsp.DocumentURI) (lsp.Docum
return lsp.NilURI, unknownURI(inoURI)
}
if !inside {
log.Printf(" passing doc identifier to '%s' as-is", inoPath)
log.Printf(" '%s' not inside sketchroot '%s', passing doc identifier to as-is", handler.sketchRoot, inoPath)
return inoURI, nil
}

Expand Down