Skip to content

cmd/compile/internal/logopt: optimizer logging directory doesn't handle Windows #41614

@stamblerre

Description

@stamblerre

We're having trouble working with the GC optimization details on Windows in gopls.
It seems that checkLogPath expects absolute paths to start with /, which is not true for Windows file paths (C:\x\y\z, etc.). We tried passing a file URI, but that also doesn't work, as file URIs should be of the form file:///C:/x/y/z, not file://C:/x/y/z. We can work around this with https://golang.org/cl/256940, but I think there are some issues with URI parsing here.

If it's helpful, here is the code that translates between file URIs and filenames in gopls: https://github.com/golang/tools/blob/06f3a46a9d1e4913ecf04347e6eea61252bf3c41/internal/span/uri.go.

/cc @pjw @dr2chase

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions