opa icon indicating copy to clipboard operation
opa copied to clipboard

Development Reference guide doesn't work on Windows

Open sean-r-williams opened this issue 11 months ago • 3 comments

Short description

Trying to step through the Development reference doesn't work due to a number of missing dependencies:

Steps To Reproduce

  1. Clone repo on Windows host
  2. Install Git/Make/Go via WinGet (Git.Git, ezwinports.make, golang.go)
  3. Try to run make

Expected behavior

Build/test occurs

Additional context

So far, there's a couple of missing requirements that aren't called out:

  • bash (kind of obvious, I guess, but Git Bash isn't put in the PATH by default on Windows)
  • gcc (required for cgo)

Additionally, the go:generate tags in main.go don't specify a shell, so Windows won't know what to do with a .sh by default.

It's totally fine if dev on Windows hosts (at least without WSL) isn't a supported scenario at the moment, but this should be called out in the developer reference.

sean-r-williams avatar Mar 16 '24 01:03 sean-r-williams

I ended up installing MSYS2 with MinGW64 variants of GCC, Go, and Make on my machine - I was able to build, however roughly 1% of tests are failing.

From the few tests I dug into, it seems like the primary issues are:

  • Newlines (i.e. expecting LF instead of CR+LF)
    • This might be resolvable client-side by configuring Git to checkout with LF-style line endings
  • Paths (i.e. \ vs / separators)

sean-r-williams avatar Mar 16 '24 09:03 sean-r-williams

Thanks for working through the steps. I agree we should update the documentation to include a note about the extra steps that need to taken on a Windows machine. If you're able to make the flow work on Windows and add a note in the docs about it that would be great! We should do the later either ways. Thanks.

ashutosh-narkar avatar Mar 18 '24 18:03 ashutosh-narkar

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue.

stale[bot] avatar Apr 18 '24 03:04 stale[bot]